Remove retain flag for event based sensors (only switch for now)

This commit is contained in:
Your Name
2017-01-15 01:22:35 +03:00
parent 78dd74edd0
commit 5251f963a6
+3
View File
@@ -72,6 +72,9 @@ class Mqtt:
if (model == "motion" and key == "no_motion"): if (model == "motion" and key == "no_motion"):
key="status" key="status"
value="no_motion" value="no_motion"
# do not retain event-based sensors (like switches).
if (model == "switch"):
retain = False
# fix for rgb format # fix for rgb format
if (key == "rgb" and self._is_int(value)): if (key == "rgb" and self._is_int(value)):