scenes-ericks-desk-lamp.yaml 1.01 KB
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 Erick's Desk Lamp
trigger:
  platform: state
  entity_id: input_select.scene_ericks_desk_lamp
action:
  - service: scene.turn_on
    data_template:
      entity_id: >
        {% if is_state( "input_select.scene_ericks_desk_lamp", "Nightlight" ) %}
          scene.ericks_desk_lamp_nightlight
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Dimmed" ) %}
          scene.ericks_desk_lamp_dimmed
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Relax" ) %}
          scene.ericks_desk_lamp_relax
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Read" ) %}
          scene.ericks_desk_lamp_read
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Bright" ) %}
          scene.ericks_desk_lamp_concentrate
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Off" ) %}
          scene.ericks_desk_lamp_off
        {% endif %}
  - service: input_select.select_option
    data:
      entity_id: input_select.scene_ericks_desk_lamp
      option: "-"