Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_select:
- ventilation_state:
- name: Ventilation state
- options:
- - First state
- - Second state
- - Third state
- - Fourth state
- icon: mdi:fan
- automation:
- alias: ventilation_set_state
- trigger:
- - platform: state
- entity_id: input_select.ventilation_state
- action:
- - choose:
- - conditions: '{{trigger.to_state.state == "Third state"}}'
- sequence:
- - service: light.turn_on
- entity_id: light.first_relay, light.second_relay
- - conditions: '{{trigger.to_state.state == "Second state"}}'
- sequence:
- - service: light.turn_on
- entity_id: light.second_relay
- - service: light.turn_off
- entity_id: light.first_relay
- - conditions: '{{trigger.to_state.state == "Fourth state"}}'
- sequence:
- - service: light.turn_on
- entity_id: light.first_relay
- - service: light.turn_off
- entity_id: light.second_relay
- default:
- service: light.turn_off
- entity_id: light.first_relay, light.second_relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement