Skip to content

Commit

Permalink
fix(g4doorbell/chime_duration): actually set chime_duration
Browse files Browse the repository at this point in the history
  • Loading branch information
mohlek committed Mar 21, 2021
1 parent b4d13c1 commit e7edd26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyunifiprotect/unifi_protect_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit e7edd26

Please sign in to comment.