We automate Tuya Zigbee Smart Thermostatic Radiator Valve in the Home Assistant
The cold days and articles about heating have returned☺. Let’s implement an algorithm for controlling the valve according to a schedule. This mode is already available in the valve by default, but this article is not about setting up with buttons or apps for the phone ☺.
This is a translation of my article in Zen. Also, do not forget to read us in other services: Instagram, telegram (RU, EN, DE). Medium, LiveJournal, YouTube.
In the last article (RU), I upgraded the regulator, after which it began to work better, but not perfectly. This summer I added a controller to the home assistant (RU) and we can use it. Let’s set up the controller in a convenient way for us. Let’s take a look at the valve, various entities are available to us
There are a lot of objects and what to do is unclear. My opinion is that most objects are not needed. It would be great to just control the percentage of opening or closing the valve, but there is no such possibility…
At the beginning, let’s talk about the algorithm — it’s very simple: in the evening and in the morning, I like the temperature of 24 degrees, and by lunch and at night-20 degrees. I tried two control options, presets and changing the setpoint. Both options work successfully. Now we are implementing everything:
1. Control of modes. In yaml, the automations look like this:
alias: ‘Bedroom: radiator control morning’
description: ‘’
trigger:
- platform: time
at: ‘05:00’
condition: []
action:
- device_id: cc1c565c549d74937d6ad0e3a250f34d
domain: climate
entity_id: climate.0x842e14fffee5564b
type: set_preset_mode
preset_mode: comfort
mode: single
This automation is suitable for the morning. Automation for the evening is below.
alias: ‘Bedroom: radiator control night’
description: ‘’
trigger:
- platform: time
at: ‘22:00’
condition: []
action:
- device_id: cc1c565c549d74937d6ad0e3a250f34d
domain: climate
entity_id: climate.0x842e14fffee5564b
type: set_preset_mode
preset_mode: eco
mode: single
The algorithm is simple, at 5 am we start the comfort mode (the temperature is set to 24 degrees), and at 22.00 — eco (the temperature is set to 20 degrees). You can also activate the away mode (the temperature is set to 15 degrees for it) when everyone leaves the apartment, this will help us save money. Naturally, the temperature settings for each mode are configured flexibly.
To switch the graphic mode to text mode, we go to the new automation and click on the 3 dots in the upper right corner and select the yaml (text) option. Of course, you can also write automation immediately in the file automation.yaml
2. Setpoint control
alias: ‘Bedroom: radiator temp control morning’
description: ‘’
trigger:
- platform: time
at: ‘05:00’
condition: []
action:
- service: climate.set_temperature
target:
device_id: cc1c565c549d74937d6ad0e3a250f34d
data:
temperature: 25
mode: single
well, reverse automation
alias: ‘Bedroom: radiator temp control night’
description: ‘’
trigger:
- platform: time
at: ‘19:00’
condition: []
action:
- service: climate.set_temperature
target:
device_id: cc1c565c549d74937d6ad0e3a250f34d
data:
temperature: 20
mode: single
If in the first option we controlled the device directly, then in the second case we do it through the climate service. In the graphical interface, we can simply select a room or our apartment (depending on the settings) and all devices will be controlled by one rule. This is convenient.
Another advantage of the second method is the ability to set any temperature, and not only from pre-programmed ones. But for the last rule to work, the valves must be in manual control mode, otherwise the rule will not apply.
And that’s all, subscribe, likes, repost… And we will soon be a small lottery ☺.