Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Telecomando tavolo cucina
- - id: telecomando_tavolo
- alias: 'Gestione telecomando tavolo cucina'
- mode: restart
- trigger:
- - platform: event
- event_type: zha_event
- event_data:
- device_ieee: 'ec:1b:bd:ff:fe:b4:b6:35'
- condition: []
- action:
- - variables:
- command: "{{ trigger.event.data.command }}"
- - choose:
- - conditions:
- - "{{ command == 'on' }}"
- sequence:
- - service: light.turn_on
- entity_id: light.tavolo
- data:
- transition: 1
- - conditions:
- - "{{ command == 'off' }}"
- sequence:
- - service: light.turn_off
- entity_id: light.tavolo
- data:
- transition: 1
- - conditions:
- - "{{ command == 'move_with_on_off' }}"
- sequence:
- repeat:
- while:
- - condition: template
- value_template: "{{ repeat.index < 10 }}"
- sequence:
- - service: light.turn_on
- entity_id: light.tavolo
- data:
- brightness_step_pct: 10
- - delay: 1
- - conditions:
- - "{{ command == 'move' }}"
- sequence:
- repeat:
- while:
- - condition: template
- value_template: "{{ repeat.index < 10 }}"
- sequence:
- - service: light.turn_on
- entity_id: light.tavolo
- data:
- brightness_step_pct: -10
- - delay: 1
- - conditions:
- - "{{ command == 'stop' }}"
- sequence:
- - service: light.turn_on
- entity_id: light.tavolo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement