From ad2506c0f23373605977f5aad49765813544e6cb Mon Sep 17 00:00:00 2001 From: jerryzz Date: Sun, 14 Mar 2021 00:14:06 +0100 Subject: [PATCH] Update mqtt.py Add "no_motion" publish = no-motion time 120, 180, ....(s) --- src/mqtt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mqtt.py b/src/mqtt.py index a63e9a2..7382552 100644 --- a/src/mqtt.py +++ b/src/mqtt.py @@ -95,7 +95,10 @@ class Mqtt: items = {} for key, value in data.items(): # fix for latest motion value + if (model in self.motion_sensors and key == "status"): + items["no_motion"] = 0 if (model in self.motion_sensors and key == "no_motion"): + items[key] = value key = "status" value = "no_motion" if (model in self.magnet_sensors and key == "no_close"):