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
+11
-1
@@ -111,6 +111,14 @@ max: 15
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
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:
|
||||
- variables:
|
||||
@@ -121,6 +129,8 @@ action:
|
||||
# Time since the previous MQTT event triggered this automation.
|
||||
# Genuine stop_rotating events immediately follow rotation events.
|
||||
# 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: >
|
||||
{{ as_timestamp(now()) -
|
||||
as_timestamp(
|
||||
@@ -210,4 +220,4 @@ action:
|
||||
target: !input target_light
|
||||
data:
|
||||
brightness_step_pct: "{{ scaled_step }}"
|
||||
transition: !input dim_transition
|
||||
transition: !input dim_transition
|
||||
Reference in new issue
Block a user