--- - alias: "[Scene] Living Room Scene Rotation" initial_state: 'true' trigger: platform: state entity_id: input_select.living_room_scenes action: - service: scene.turn_on data_template: entity_id: scene.living_room_{{ states.input_select.living_room_scenes.state | replace(' ', '_') | lower | string }} transition: 2.5 - service: input_text.set_value target: entity_id: input_text.living_room_last_scene data: value: "{{ states.input_select.living_room_scenes.state | replace(' ', '_') | lower | string }}" - service_template: > {% if states.input_select.living_room_scenes.state | lower | string == 'off' %} input_boolean.turn_off {% else %} input_boolean.turn_on {% endif %} entity_id: - input_boolean.living_room_light_state