This is my automation:
alias: Toggle Light with R5 Button 6 Single Press - Any Change
trigger:
- platform: state
entity_id: sensor.sonoffr5ble_r5_1_button_6
condition:
- condition: template
value_template: "{{ trigger.to_state.state == '.6-SINGLE' }}"
action:
- service: light.toggle
target:
entity_id: light.yeelight_ct_bulb
mode: single
I'm using a text sensor to toggle a lightbulb.
The sensor in changes state correctly in the overview but the automation is having problems