scenes-ericks-desk-lamp.yaml 1.64 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4
alias: Scene Erick's Desk Lamp
trigger:
  platform: state
  entity_id: input_select.scene_ericks_desk_lamp
Erick Hitter's avatar
Erick Hitter committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Nightlight'
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Dimmed'
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Relax'
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Read'
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Bright'
    - condition: state
      entity_id: 'input_select.scene_ericks_desk_lamp'
      state: 'Off'
Erick Hitter's avatar
Erick Hitter committed
26 27 28 29 30
action:
  - service: scene.turn_on
    data_template:
      entity_id: >
        {% if is_state( "input_select.scene_ericks_desk_lamp", "Nightlight" ) %}
Erick Hitter's avatar
Erick Hitter committed
31
          scene.erick_s_desk_lamp_nightlight
Erick Hitter's avatar
Erick Hitter committed
32
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Dimmed" ) %}
Erick Hitter's avatar
Erick Hitter committed
33
          scene.erick_s_desk_lamp_dimmed
Erick Hitter's avatar
Erick Hitter committed
34
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Relax" ) %}
Erick Hitter's avatar
Erick Hitter committed
35
          scene.erick_s_desk_lamp_relax
Erick Hitter's avatar
Erick Hitter committed
36
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Read" ) %}
Erick Hitter's avatar
Erick Hitter committed
37
          scene.erick_s_desk_lamp_read
Erick Hitter's avatar
Erick Hitter committed
38
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Bright" ) %}
Erick Hitter's avatar
Erick Hitter committed
39
          scene.erick_s_desk_lamp_concentrate
Erick Hitter's avatar
Erick Hitter committed
40
        {%-elif is_state( "input_select.scene_ericks_desk_lamp", "Off" ) %}
Erick Hitter's avatar
Erick Hitter committed
41
          scene.erick_s_desk_lamp_off
Erick Hitter's avatar
Erick Hitter committed
42 43 44 45 46
        {% endif %}
  - service: input_select.select_option
    data:
      entity_id: input_select.scene_ericks_desk_lamp
      option: "-"