Can someone explain this to me:
trigger:
- platform: state
entity_id: sensor.button_switch_action
to: 'release'
action:
- service: notify.pushover
data_template:
message: >
To: {{trigger.to_state}}
From: {{trigger.from_state}}
To: <state sensor.button_switch_action=release; action=release, battery=100, linkquality=167, temperature=27, voltage=3035, icon=mdi:gesture-double-tap, friendly_name=Button Switch action @ 2022-06-01T15:18:28.719613+10:00>
From: <state sensor.button_switch_action=; action=release, battery=100, linkquality=167, temperature=27, voltage=3035, icon=mdi:gesture-double-tap, friendly_name=Button Switch action @ 2022-06-01T15:18:18.350133+10:00>
I am playing with a xiaomi button switch, holding down triggering the ‘hold’ action but on release I am getting a from_state blank switch action and the action attribute is showing as ‘release’. Surely the from_state should be indicating ‘hold’.