Fix for magnet sensor open state - when opened long time

This commit is contained in:
2017-03-06 20:55:30 +03:00
parent 54eda12502
commit 86d6db496a
3 changed files with 9 additions and 3 deletions
+4
View File
@@ -72,6 +72,10 @@ class Mqtt:
if (model == "motion" and key == "no_motion"):
key="status"
value="no_motion"
if (model == "magnet" and key == "no_close"):
key="status"
value="open"
# do not retain event-based sensors (like switches and cubes).
if (model in ["switch", "cube"]):
retain = False