Remove retain flag for event based sensors (only switch for now)
This commit is contained in:
@@ -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)):
|
||||||
|
|||||||
Reference in New Issue
Block a user