in my automation as a Condition in a repeat “Until” “remote_button_long_press” loop on my aqara smart switch. I can select differing button press events in the Trigger section but cannot select this as a “Condition” in the GUI, I can only select temperature or battery sensors for the aqara smart switch. Is there any particular reason why i cannot select this as a condition? Is this achievable in this way? I have tried to select it as a device or under state > entity in “Add Condition” but the options are missing compared to Trigger > Device > “Aqara Smart Switch”
You can only use a state in a condition.
The press of the button sends an event and is not a state.
You can create a input helper which you can set via automation by the aqara switch
I created an automation to capture a “short press event” and then used the “current” attribute to use in the until repeat loop. Had to use numeric_state as normal state didn’t work as a condition using the “current” attribute.
automation.emergency_switch_input_helper
device_id: <redacted>
domain: deconz
platform: device
type: remote_button_short_press
subtype: turn_on
condition: []
action:
- service: notify.living_room_tv
data:
message: Notice has been cancelled
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- stop: input helper for Bin Collection
mode: single
snippet condition to interrupt repeat / loop in new Bin collection automation.