automation: # Telecomando on/off - id: 12252ef6-be01-4f74-97da-6b0c67f40e96 alias: 'Gestione accensione/spegnimento con telecomando Ikea Tradfri dimmer' mode: single trigger: - platform: event event_type: zha_event event_data: device_ieee: '12:34:56:78:9a:bc:de:f0' action: - variables: command: "{{ trigger.event.data.command }}" args: "{{ trigger.event.data.args }}" light_dest: light.shelly_1 - alias: "Selezione tipo di evento" choose: # Tasto ON - conditions: "{{ command == 'on' }}" sequence: - alias: "Accende la luce" service: light.turn_on target: entity_id: "{{ light_dest }}" # Tasto OFF - conditions: "{{ command == 'off' }}" sequence: - alias: "Spegne la luce" service: light.turn_off target: entity_id: "{{ light_dest }}"