Skip to content

Commit

Permalink
Fix battery cam motion push
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 19, 2024
1 parent ec45aa2 commit b646676
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reolink_aio/baichuan/baichuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ def _parse_xml(self, cmd_id: int, xml: str) -> None:
if self._subscribed and not self._events_active:
self._events_active = True

motion_state = False
if states is not None:
motion_state = "MD" in states
visitor_state = "visitor" in states
Expand All @@ -392,6 +393,8 @@ def _parse_xml(self, cmd_id: int, xml: str) -> None:
if ai_state != self.http_api._ai_detection_states[channel][ai_type_key]:
_LOGGER.debug("Reolink %s TCP event channel %s, %s: %s", self.http_api.nvr_name, channel, ai_type_key, ai_state)
self.http_api._ai_detection_states[channel][ai_type_key] = ai_state
if ai_type_key == "other" and not motion_state:
self.http_api._motion_detection_states[channel] = ai_state

ai_type_list = ai_types.split(",")
for ai_type in ai_type_list:
Expand Down

0 comments on commit b646676

Please sign in to comment.