@Matt112 wrote:
I am using the script below to make my Nest to go into Eco when triggered by an Automation and then go back to the last setting prior to the triggering. I think I am doing something wrong with my input_text since it is returning a state of unknown. I have added the input_text config below
nest_eco_on: alias: Nest Thermostat - Set to ECO mode sequence: # Only turn on ECO mode if thermostat is not off and not already in ECO # mode. - condition: template value_template: > {{ states('sensor.kitchen_thermostat_hvac_mode') not in ['off', 'eco'] }} - service: input_text.set_value entity_id: input_text.previous_hvac_mode data_template: value: "{{ states('sensor.kitchen_thermostat_hvac_mode') }}" - service: climate.set_preset_mode entity_id: climate.kitchen data: preset_mode: eco nest_eco_off: alias: Nest Thermostat - Return from ECO mode sequence: # Only set back to previous mode if thermostat is still in ECO mode. - condition: template value_template: > {{ is_state('sensor.kitchen_thermostat_hvac_mode', 'eco') }} - service: climate.set_hvac_mode entity_id: climate.kitchen data_template: hvac_mode: "{{ states('input_text.previous_hvac_mode') }}"
this is the input_text
input_text: previous_hvac_mode: name: previous hvac mode pattern: "cool, heat, eco, off, away, auto" initial: "auto"
The scripts seem to be working but since it says unknown in the input text it cant complete the cycle.
Posts: 1
Participants: 1