Attempt fix to ignore constant null action traffic for H2 EU dimmer
This commit is contained in:
1 parent
87c2f61dad
commit
746a048251
1 file changed
+10
@@ -111,6 +111,14 @@ max: 15
|
|||||||
trigger:
|
trigger:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
topic: !input mqtt_topic
|
topic: !input mqtt_topic
|
||||||
|
payload: "action"
|
||||||
|
value_template: >
|
||||||
|
{{ 'action'
|
||||||
|
if value_json is defined
|
||||||
|
and value_json.action is defined
|
||||||
|
and value_json.action is not none
|
||||||
|
and (value_json.action | string | length > 0)
|
||||||
|
else 'ignore' }}
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- variables:
|
- variables:
|
||||||
@@ -121,6 +129,8 @@ action:
|
|||||||
# Time since the previous MQTT event triggered this automation.
|
# Time since the previous MQTT event triggered this automation.
|
||||||
# Genuine stop_rotating events immediately follow rotation events.
|
# Genuine stop_rotating events immediately follow rotation events.
|
||||||
# The H2 bug emits a stray stop_rotating after the device has been idle.
|
# The H2 bug emits a stray stop_rotating after the device has been idle.
|
||||||
|
# Null/missing action packets are filtered at the MQTT trigger above,
|
||||||
|
# so only genuine action events affect this timer.
|
||||||
idle_seconds: >
|
idle_seconds: >
|
||||||
{{ as_timestamp(now()) -
|
{{ as_timestamp(now()) -
|
||||||
as_timestamp(
|
as_timestamp(
|
||||||
|
|||||||
Reference in new issue
Block a user