Okay, I solved the variable issue by creating helper input_number(s). Certainly a better way to go since I can control those from my dashboard, but something still seems to be bugging the “thermostat” variable.
I have also created 3 input booleans, which correlate to each of the 3 thermostats. Their names are
thermostat_idle_work_room
thermostat_idle_bedroom
thermostat_idle_living_room
climate.living_room_thermostat should be impacted by input_boolean.thermostat_idle_living_room, etc.
Any ideas how can I integrate a check within my repeat sequence, that checks if those input booleans are also off? So for the sequence the proceed, the corresponding input boolean needs to be off.
I can’t seem to get this to work:
repeat:
for_each: >
{% set climates = [
{"thermostat": "climate.work_room_thermostat", "room_clear_boolean": "input_boolean.thermostat_idle_work_room"},
{"thermostat": "climate.bedroom_thermostat", "room_clear_boolean": "input_boolean.thermostat_idle_bedroom"},
{"thermostat": "climate.living_room_thermostat", "room_clear_boolean": "input_boolean.thermostat_idle_living_room"}
] %}
{{ climates | selectattr('thermostat', 'in', states | map(attribute='entity_id') | list) | select('is_state', 'heat') | select('room_clear_boolean', '==', 'off') | map(attribute='thermostat') | list }}
sequence:
- service: climate.set_temperature
target:
entity_id: "{{ repeat.item }}"
data:
temperature: "{{ states('input_number.climate_temperature_home') }}"
alias: Set Home Temperature on Thermostats