Skip to content

Commit

Permalink
Catch errors while removing chime
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 18, 2024
1 parent 514bec5 commit b15677b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6309,4 +6309,7 @@ async def set_tone(self, event_type: str, tone_id: int) -> None:

async def remove(self) -> None:
body = [{"cmd": "DingDongOpt", "action": 0, "param": {"DingDong": {"channel": self.channel, "id": self.dev_id, "option": 1}}}]
await self.host.send_setting(body)
try:
await self.host.send_setting(body)
except ReolinkError as err:
_LOGGER.warning("Error while removing chime %s, channel %s: %s", self.dev_id, self.channel, str(err))

0 comments on commit b15677b

Please sign in to comment.