molnart
(Tibor Molnár)
1
I am trying to adjust my automation that i use to switch my esp32 thermostat to night mode to take input helper values instead of fixed values.
So i set the automation action like this:
service: climate.set_temperature
data:
target_temp_high: {{ states('input_number.heating_night_high') }}
target_temp_low: {{ states('input_number.heating_night_low') }}
target:
entity_id: climate.heating_thermostat
However after saving and opening the automation again the section looks likes this:
What am I doing wrong?
123
(Taras)
2
Wrap the single-line templates in double-quotes.
service: climate.set_temperature
data:
target_temp_high: "{{ states('input_number.heating_night_high') }}"
target_temp_low: "{{ states('input_number.heating_night_low') }}"
target:
entity_id: climate.heating_thermostat
Reference: Important Template Rules
Or you can use a line-continuation character like this:
service: climate.set_temperature
data:
target_temp_high: >
{{ states('input_number.heating_night_high') }}
target_temp_low: >
{{ states('input_number.heating_night_low') }}
target:
entity_id: climate.heating_thermostat
2 Likes