Hi,
A simple problem that I’ve now spent too many hours trying to figure out…
I need to record the previous state of an input_select so that its state can be returned to in future.
So I have created two input_selects;
input_select:
set_water_heater_mode:
name: Water Heater Mode
options:
- Manual
- Eco
- Smart
- Timer
- Travel
- Boost
previous_water_heater_mode:
name: Previous Water Heater Mode
options:
- Manual
- Eco
- Smart
- Timer
- Travel
- Boost
When the first one changes, the second needs to be set to the previous value of the first.
- id: Water Heater Previous Mode
alias: Water Heater Previous Mode
trigger:
- platform: state
entity_id: input_select.set_water_heater_mode
action:
- service: input_select.select_option
target:
entity_id: input_select.previous_water_heater_mode
data:
option: "{{ states.trigger.from_state.state }}"
It doesn’t work, what am I getting wrong here?
Thank you