From 319217b195a5d2d48670ad6b6fcbc6912120e839 Mon Sep 17 00:00:00 2001 From: Daniel Chesterton Date: Sun, 16 May 2021 00:37:32 +0100 Subject: [PATCH] Add fix for AD410 events --- src/amcrest2mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amcrest2mqtt.py b/src/amcrest2mqtt.py index 4d142b7..96a7cde 100644 --- a/src/amcrest2mqtt.py +++ b/src/amcrest2mqtt.py @@ -248,7 +248,7 @@ log("Listening for events...") try: for code, payload in camera.event_actions("All", retries=5): - if (is_doorbell and code == "ProfileAlarmTransmit") or (code == "VideoMotion" and not is_doorbell): + if (device_type == "AD110" and code == "ProfileAlarmTransmit") or (code == "VideoMotion" and device_type != "AD110"): motion_payload = "on" if payload["action"] == "Start" else "off" mqtt_publish(topics["motion"], motion_payload) elif code == "_DoTalkAction_":