I’ve a little problem with “input selectors”. If the state of a entity_sensor is changing, the UI “input select menue” keep always the last settings. How can I set the UI-Menue to the value of the entity_sensor if it is changing. Here my code as a sample:
sensor:
- platform: template
sensors:
# Solar Ladung In
bsb_lan_sol_ladung:
unique_id: bsb_lan_sol_ladung
friendly_name: "BSB-LAN Solar Ladung"
value_template: "{% if states('sensor.bsb_lan_time') is defined and states('sensor.bsb_lan_time') != 'unavailable' %}{{state_attr('sensor.bsb_lan_time', '3822')['desc'] }}{% else %}{{ states('sensor.bsb_lan_sol_ladung') }}{% endif %}"
input_select:
bsb_lan_sol_ladung:
name: BSB-LAN Solar Ladung Input
options:
- Kein
- Trinkwasserspeicher
- Pufferspeicher
icon: mdi:list-box
automation:
# get value.json ------------------------------------------------------------------------
# Ladung In - auslesen
- id: bsb_lan_get_sol_ladung
alias: BSB-LAN Solar Ladung auslesen
trigger:
- platform: state
entity_id: sensor.bsb_lan_sol_ladung
action:
- service: input_select.set_options
target:
entity_id: input_select.bsb_lan_sol_ladung
options: "{{ states('sensor.bsb_lan_sol_ladung') }}"
mode: single
The actual state is “Kein” but it keep: