alias: Scene LR Ceiling
trigger:
  platform: state
  entity_id: input_select.scene_lr_ceiling
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: 'input_select.scene_lr_ceiling'
      state: 'Nightlight'
    - condition: state
      entity_id: 'input_select.scene_lr_ceiling'
      state: 'Dimmed'
    - condition: state
      entity_id: 'input_select.scene_lr_ceiling'
      state: 'Bright'
    - condition: state
      entity_id: 'input_select.scene_lr_ceiling'
      state: 'Off'
action:
  - service: scene.turn_on
    data_template:
      entity_id: >
        {% if is_state( "input_select.scene_lr_ceiling", "Nightlight" ) %}
          scene.lr_ceiling_nightlight
        {%-elif is_state( "input_select.scene_lr_ceiling", "Dimmed" ) %}
          scene.lr_ceiling_dimmed
        {%-elif is_state( "input_select.scene_lr_ceiling", "Bright" ) %}
          scene.lr_ceiling_bright
        {%-elif is_state( "input_select.scene_lr_ceiling", "Off" ) %}
          scene.lr_ceiling_off
        {% endif %}
  - service: input_select.select_option
    data:
      entity_id: input_select.scene_lr_ceiling
      option: "-"