Merge pull request #24 from jerryzz/master

Update mqtt.py
This commit is contained in:
monster authored and GitHub committed 2021-03-14 02:16:48 +03:00
commit 41dd77c37a
1 file changed
+3
+3
View File
@@ -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"):