Merge pull request #32 from ircmaxell/fix_disconnect_handling

Skip DISCONNECT events
This commit is contained in:
Sebastian Goscik
2022-03-26 16:20:51 +00:00
committed by GitHub

View File

@@ -431,6 +431,8 @@ class UnifiProtectBackup:
return
if msg.new_obj.end is None:
return
if msg.new_obj.type not in [EventType.MOTION, EventType.SMART_DETECT, EventType.RING]:
return
if msg.new_obj.type is EventType.MOTION and "motion" not in self.detection_types:
logger.extra_debug(f"Skipping unwanted motion detection event: {msg.new_obj.id}") # type: ignore
return