Hi
Trying to make an automation if wall switch is turned of or on. Lights goes on and of with sunset and time, but i need to be able to turn them of or on with an wall switch and a remote as well. I can not use the trigger state from off to on, because the switch is not in sync with lights. If switch is already off, and i press off nothing will happened. I found a trigger call button_pressed but it does not work.
- id: Lysbr_H_pa
alias: Lysbryter H på
trigger:
platform: event
event_type: button_pressed
event_data: {"state": "on", "entity_id": "switch.bryter_h_121"}
action:
- service: light.turn_on
entity_id:
- light.spisestue_taklys_29
- service: light.turn_on
data:
entity_id: light.spisestue_hovedlys_35
brightness_pct: 60