@Dreamoffice wrote:
hello
i have setup a input_select to pick scenes- alias: LichtWohnzimmer initial_state: true trigger: - platform: state entity_id: - input_select.szenen_wohnzimmer action: - service: scene.turn_on data_template: entity_id: > {% if trigger.entity_id == 'input_select.szenen_wohnzimmer' %} {% if trigger.to_state.state == 'Normal' %} scene.normal {% elif trigger.to_state.state == 'Abends' %} scene.abends {% elif trigger.to_state.state == 'Pink' %} scene.pink {% elif trigger.to_state.state == 'Hell' %} scene.hell {% elif trigger.to_state.state == 'Blau' %} scene.blau {% elif trigger.to_state.state == 'Frühling' %} scene.fruehling {% else %} scene.aus {% endif %} {% endif %}
this is working ok.
now i want to toggle through the input_select options with an Aqara switch. but this automation is not working.- id: Aqara Schalter 2 linke Schaltflaeche kurz alias: Licht szenen togglen trigger: - platform: mqtt topic: zigbee2mqtt/xiaomi_schalter_wohnzimmer condition: - condition: template value_template: '{{ "left" == trigger.payload_json.click }}' action: service: input_select.select_option data_template: entity_id: > {% if is_state("input_select.szenen_wohnzimmer", "Normal" )%} 'Abends' {% elif is_state("input_select.szenen_wohnzimmer", "Abends" )%} 'Pink' {% elif is_state("input_select.szenen_wohnzimmer", "Pink" )%} 'Hell' {% elif is_state("input_select.szenen_wohnzimmer", "Hell" )%} 'Normal' {% endif %}
where is the mistake in this automation? is there another way to handle this?
Posts: 1
Participants: 1