From e7edd26823505f73e97b1a46e70f397a95126a3f Mon Sep 17 00:00:00 2001 From: Maurice Mohlek Date: Sun, 21 Mar 2021 14:09:16 +0100 Subject: [PATCH] fix(g4doorbell/chime_duration): actually set chime_duration --- pyunifiprotect/unifi_protect_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyunifiprotect/unifi_protect_server.py b/pyunifiprotect/unifi_protect_server.py index c009442e..e24a4e26 100644 --- a/pyunifiprotect/unifi_protect_server.py +++ b/pyunifiprotect/unifi_protect_server.py @@ -698,8 +698,10 @@ async def set_doorbell_chime_duration(self, camera_id: str, duration: int) -> bo if duration < 0: chime_duration = 0 - if duration > 10000: + elif duration > 10000: chime_duration = 10000 + else: + chime_duration = duration cam_uri = f"{self._base_url}/{self.api_path}/cameras/{camera_id}" data = {"chimeDuration": chime_duration}