scenes-dining-area.yaml 832 Bytes
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
alias: Scene Dining Area
trigger:
  platform: state
  entity_id: input_select.scene_da
action:
  - service: scene.turn_on
    data_template:
      entity_id: >
        {% if is_state( "input_select.scene_da", "Nightlight" ) %}
          scene.da_nightlight
        {%-elif is_state( "input_select.scene_da", "Dimmed" ) %}
          scene.da_dimmed
        {%-elif is_state( "input_select.scene_da", "Relax" ) %}
          scene.da_relax
        {%-elif is_state( "input_select.scene_da", "Read" ) %}
          scene.da_read
        {%-elif is_state( "input_select.scene_da", "Bright" ) %}
          scene.da_concentrate
        {%-elif is_state( "input_select.scene_da", "Off" ) %}
          scene.da_off
        {% endif %}
  - service: input_select.select_option
    data:
      entity_id: input_select.scene_da
      option: "-"