What do I want to have:
If temperature on radiator valve goes below threshold - it opens and also it starts heater. So each room can have itâs own temperature and I warm only rooms I need. How I was trying to solve this:
this makes an error in logs - Unable to update from sensor: could not convert string to float: âheatâ
So it doesnât seem to be a good idea.
Automation using created devices
Goal - if I receive change state from any radiator valve I compare temperature against current_temperature and execute script with heater on or off.
this doesnât work. Despite of the temperature/current_temperature values - it always call the script.
Use automation based on HVAC_ACTION
Since hvac_action can be idle or heating
alias: Heating ON
description: ''
trigger:
- platform: state
entity_id: climate.bedroom_yourik_radiator_thermostat
attribute: hvac_action
from: idle
to: heating
for: '00:01:00'
- platform: state
entity_id: climate.bathroom_radiator_thermostat
attribute: hvac_action
from: idle
to: heating
for: '00:01:00'
condition: []
action:
- service: script.heater_turn_on
mode: single
it almost worked. But there were moments when hvac_action changes but this event is somehow not registered or temperatures changes but hvac_action is not and, correspondingly, heater doesnât go on/off.
Or I went to completely wrong direction and it is better to use MQTT integration?
So I would appreciate any advice on how to set it up.
1 is the correct way, create a climate entity. However heater: is supposed to be a switch to turn the heating on, device_tracker.e8_db_84_ae_2a_b0 is a device tracker, it canât swtich your boiler on surely?
Also target_sensor: climate.bedroom_yourik_radiator_thermostat is weird. Do you already have a climate entity? What is it? Is climate.bedroom_yourik_radiator_thermostat even an entity? If it is, the state of a climate entity is not a temperature, it is a string like heat. Guessing this is the real problem.
target_sensor string REQUIRED> entity_id for a temperature sensor, target_sensor.state must be temperature.
Also your subject says zigbee2mqtt, your questions says ZHA. Which is it?
alias: Heating manual
trigger:
- platform: template
value_template: >-
states(''sensor.bedroom_yourik_target_temperature'')|float >
states(''sensor.bedroom_yourik_current_temperature'')|float
condition: []
action:
- service: persistent_notification.create
data:
message: yourik target T > current T
but now I am still confused
when target T is more that current T - heater relay turns ON (and heater starts). But in this case - thermostat motor doesnât work, hvac_action remains the same, so it wonât open (or close) a radiator crane. And I didnât find a way to change it. I can do either on/off/toggle radiator, change preset and change HVAC mode (which has only value HEAT). None of these starts motor
I have a few radiators. Do I understand it correct that Iâll need to duplicate generic_thermostat and two sensors for each of them but use the same *heater: switch_house_cv_relay" ?
this thermostat has a motor inside which opens or closes valve. This process is based on
hvac_action = idle/heating
so if take climate.bedroom_yourik_radiator_thermostat entity (see above) and change this parameter - valve will get open/closed. And Step 3 (see above) is based on this parameter.
But I donât know how to access this field if I do automation for generic thermostat (see screenshots above)
Ok, but what does the relay do, then?
If itâs unrelated to the valve, then you would have to open the valve as a secondary service in the same automation.
alias: Heating ON 2
description: ''
trigger:
- platform: state
entity_id: climate.bedroom_yourik_radiator_thermostat
- platform: state
entity_id: climate.livingroom_radiator_thermostat
condition:
- condition: or
conditions:
- condition: template
value_template: >-
states(''sensor.bedroom_yourik_target_temperature'')|float >
states(''sensor.bedroom_yourik_current_temperature'')|float
- condition: template
value_template: >-
states(''sensor.living_room_target_temperature'')|float >
states(''sensor.living_room_current_temperature'')|float
action:
- service: script.heater_turn_on
mode: single
where all sensor.xxx - are defined as template sensors.
both current temperature = 20 degree
both target temperature = 5 degree
when I start automation - it turns on the heater relay.
What is wrong with the conditions? I canât see it
but the idea is - radiator valve knob takes care of opening or closing the radiator valve. And on every state change - I decide either to turn on or turn off the heater itself
climate.0x003c84fffe21f325 is the ID of the device in HASS, though Iâm getting: TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr('climate.0x003c84fffe21f325', 'local_temperature') | float }}' but no default was specified') while processing template 'Template("{{ state_attr('climate.0x003c84fffe21f325', 'local_temperature') | float }}")' for attribute '_attr_native_value' in entity 'sensor.guest_bedroom_trv_sensor'
Schedule by calendar: set the temperature of each room with a local calendar and as many heating events as you like
Multiple thermostats: One or more thermostats per room: multiple thermostats are synchronised together. Works with smart TRVs, any smart thermostat, or Generic Thermostat
Manual override: a change on the thermostat, dashboard or by voice assistant remains in effect for a defined period (default 2 hours)
Door or window open: heating turns off heating in the room if any door or window is left open for a defined period (default 3 minutes) â optional list of zero or more closure sensors.
Occupancy: heating turns off heating if a room is left unoccupied for a defined period (default 1 hour) â optional list of zero or more motion or human presence sensors.
Warmup period: occupancy is ignored for a defined period at the start of a calendar event (default 2 hours)
Away mode: set all rooms to a temperature specified per room (default 5C) when there is no one at home
Background temperature: used when there is no calendar event (default 5C but specified separately from the frost and away temperatures)
Zone control: can switch one or multiple heating zone valves, or a boiler that needs a heat demand switch, based on heat demand from a group of thermostats
Notifications: if thermostats do not respond to a new setting, go offline, or come back online
Robust: Graceful degradation when a thermostat or a sensor is offline
Battery-efficient: conserves TRV battery life by only transmitting real changes
Code generator: uses mail merge (!) to automatically generate YAML code for helpers, timers, template sensors, groups, automations, and dashboard cards from a single EXEL spreadsheet that lists zones, rooms and thermostats