Im after suggestions of how to use several Zigbee trv’s to control my nest thermostat
I know this would essentially make the nest redundant as as thermostat and just a switch for the boiler but it would give better control per room.
code originally from @petro (thank you) tweeked for my needs
#first automation
alias: Turn off heating if all rads are equal or above target.
trigger:
- platform: template
value_template: >
{% set therms = [
states.climate.kitchen_rad,
states.climate.living_room_rad,
states.climate.hall_rad,
states.climate.salon_rad,
states.climate.jacks_rad,
states.climate.master_bedroom,
] %}
{% set climates = namespace(at_target=[]) %} {% for therm in therms %}
{% if therm.attributes.current_temperature >= therm.attributes.temperature
%} {% set climates.at_target = climates.at_target + [ therm.entity_id ]
%} {% endif %} {% endfor %} {{ climates.at_target | length == therms |
length }}
condition:
- condition: state
entity_id: climate.living_room_thermostat
state: heating
attribute: hvac_action
action:
- service: climate.set_temperature
target:
entity_id: climate.living_room_thermostat
data:
temperature: 15
mode: single
#second automation
alias: Turn on heating off if rads are calling for heat
trigger:
- platform: template
value_template: >
{% set therms = [
states.climate.kitchen_rad,
states.climate.living_room_rad,
states.climate.hall_rad,
states.climate.salon_rad,
states.climate.jacks_rad,
states.climate.master_bedroom,
] %}
{% set climates = namespace(under=[]) %} {% for therm in therms %} {% if
therm.attributes.current_temperature < therm.attributes.temperature %} {%
set climates.under = climates.under + [ therm.entity_id ] %} {% endif %}
{% endfor %} {{ climates.under | length > 0 }}
condition:
- condition: state
entity_id: climate.living_room_thermostat
state: idle
attribute: hvac_action
action:
- service: climate.set_temperature
target:
entity_id: climate.living_room_thermostat
data:
temperature: 28
mode: single
Would this also work with opentherm connection? As I understand. If the trv’s in the room (with the nest) are closing af 15 degrees and trv in for example in the bathroom is set to 21 degrees. The nest keeps the boiler activated until the heat is at 21 degrees in the bathroom?
If this is the case I would no longer need another opentherm solution and have still an function fir my nest.
don’t know. sorry. give it a go and see
Hi Dan,
For some reason, the template does not generate a trigger with my Z-Wave TRV’s. I am using a few thermostats, e.g.
states.climate.sebastian_thermostaat2sebastian
I am not experienced with Jinja at all, and I am not sure what’s happening at this line:
set climates=namespace(under[])
I can follow the rest of the script, which was copy-pasted into the editor (edit in YAML). The action runs properly, I removed the condition for now. There is no trigger when I set the TRV temp really high, but when I put in something entirely different (e.g. I turn off a light), the automation is triggered properly. I’m doing something wrong in the trigger template. Could it have to do with the fact that I am using ZWave TRV’s?
Thanks Mark
The original thread that I adapted was here - Guru needed please:- multi-zone , multi-temp heating automation - #14 by petro
@petro would be the best person To ask I think.