Great, i have one more question that is probably the most difficult but perhaps you have solved it already.
I have set up and input_select with the following plan:
Normal Heating → 25 degrees
Pre-Heat → 22 degrees
Sleeping Temperature → 20 degrees
Heating off → 7 degrees
This is also linked with my Home Status input select that defines actions when i am at home, away, i sleep or i am on vacation. I use location from the phone and proximity sensors to achieve that, and a bed sensor for sleeping but regardless.
The point here is: i am at home so the heating is normal at 25 degrees. I open a window and through a sensor the TVR drops to 7 degrees (turns off the heater). I then close the window… How does the heater know how to return back to “Normal Heating” mode that was set before?
I ask this because i can also manually change the heating schedule. That means that yes i can be at home so it would be set to Normal heating but i can set it manually to “Sleeping Temperature” and open a window. I need a way that when you close the window it will read again the input select and act accordingly.
First of all, check how quickly your house cools off or heats up. My learning was that my temperature only dips with a couple of degrees over a night, if I turn the TRVs off, as my apartment is quite well-insulated. This might limit the states that you need to a normal heat and heat off. This would simplify the amount of paths a lot.
The way I would go about it, would be to have a host of automations, that automatically sets the temperature depending on different conditions.
3 automation, related to you coming or leaving home
If you enter home proximity - and it is between XX.XX and XX.XX, set the temperature to X temperature
If you enter home proximity - and it is between YY.YY and YY.YY, set the temperature to Y
If you leave home, set the temperature to Z (this is probably not needed)
2 automations, which is related to the passing of time
If the clock turns XX.XX, and you are home, set X temperature
If the clocks turns XX.XX, and you are NOT home, set Y temperature (this is probably not needed)
4 automations, related to your windows
If your window is opened, and you are not home, call the police, someone other than you is in your home!
If your window is opened, and you are home, set the temperature to X
If the window is closed and it is between XX.XX and XX.XX, set the temperature to X
If the window is closed and it is between YY.YY and YY.YY, set the temperature to Y.
You can go about it in other ways, for instance with NodeRed. But no matter what, I would start to draw all the flows, that your automations could take, on a piece of paper. And I know Home Assistant is able to support automations with multiple outcomes depending on conditions. Which would allow you to lower the amount of automations you got. But it’s not something I am that adept in.
And no, I am not able to remotely turn the TRVs off. So I just set the lowest possible temperature, so the valve is closed.
I did it based on the input_select options. Pasting the code here in case you want to replicate in the future.
I have set up and input_select with the following plan:
Normal Heating → 25 degrees
Pre-Heat → 22 degrees
Sleeping Temperature → 20 degrees
Heating off → 7 degrees
The below automation has 2 triggers:
Window Open → Action: set the thermostat to 7 degrees
Window Closed → Action → Conditions:
Input select is: Normal Heating → set the temperature to 25 degrees
Input select is: Pre-Heat → set the temperature to 22 degrees
input select is: Sleeping → set the temperature to 20 degrees
input select is: Heating off → set the temperature to 7 degrees
So when the window will close, it will check which of the above conditions apply and set the temperature to the defined level only for the Living Room Thermostat. This automation can be applied for other rooms as well.
Hope this is helpful to someone:
alias: Living Room - Temperature / Window
description: >-
This automation shuts off the living room heater when the window is open and
resumes based on plan when the window is closed
trigger:
- platform: state
entity_id: sensor.main_door_sensor
to: open
for:
hours: 0
minutes: 5
seconds: 0
id: Open
- platform: state
entity_id: sensor.main_door_sensor
to: closed
for:
hours: 0
minutes: 5
seconds: 0
id: Closed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Open
sequence:
- service: climate.set_temperature
data:
temperature: 7
target:
entity_id: climate.living_room_heater_thermostat
- conditions:
- condition: and
conditions:
- condition: trigger
id: Closed
- condition: state
entity_id: input_select.heating_schedule
state: Normal Heating
sequence:
- service: climate.set_temperature
data:
temperature: 25
target:
entity_id: climate.living_room_heater_thermostat
- conditions:
- condition: state
entity_id: input_select.heating_schedule
state: Pre-Heat
sequence:
- service: climate.set_temperature
data:
temperature: 22
target:
entity_id: climate.living_room_heater_thermostat
- conditions:
- condition: state
entity_id: input_select.heating_schedule
state: Sleeping Heating
sequence:
- service: climate.set_temperature
data:
temperature: 20
target:
entity_id: climate.living_room_heater_thermostat
- conditions:
- condition: state
entity_id: input_select.heating_schedule
state: Heating Off
sequence:
- service: climate.set_temperature
data:
temperature: 7
target:
entity_id: climate.living_room_heater_thermostat
default: []
mode: single
I just wanted to share an update on my automation with the Danfoss Ally as this might be helpful to others. I have done some additions over time and with the new Home assistant version, i was able to add more functionality. So, before, i used to set the temperature in the automation (check above). Now, i created 4 helpers (input numbers) and added them to my lovelace setting page as such:
There is also and input select to define the heating states (see above). If the input select is “Normal Heating” it will now read the “normal heating” number helper and assign the temperature set in the helper. Similar for other options as well.
The only problem i had, was that if i had a window open and changed the heating schedule, it would assign the temperature in the schedule without taking into consideration that the window is open and therefore, the heaters would work for nothing since the heating is lost through the window. But with the addition of the new action if/then else, i am now able to check if the window is open.
Example: Heating schedule is “Normal Heating” at 24 degrees, i change the schedule to Pre-Heat. Before the if/then it would just change the temperature to 20 degrees. Now, it will check if the window is open, and if yes, it will turn off the heater, else, it will set it to 20 degrees. This is awesome. So let me share the automation below. If you wish to implement just change the entities with yours obviously:
alias: HVAC - Heating Cycles
description: >-
Sets the heating plan schedule / Addition of more thermostats in the actions
is possible.
trigger:
- platform: state
entity_id: input_select.heating_schedule
to: Pre-Heat
id: Pre-Heat
- platform: state
entity_id: input_select.heating_schedule
id: Normal Heating
to: Normal Heating
- platform: state
entity_id: input_select.heating_schedule
id: Sleeping Heating
to: Sleeping Heating
- platform: state
entity_id: input_select.heating_schedule
id: Heating Off
to: Heating Off
- platform: state
entity_id: input_select.home_status
to: Away
for:
hours: 1
minutes: 0
seconds: 0
id: Away for long
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Pre-Heat
sequence:
- if:
- type: is_open
condition: device
device_id: a8155de384e2c41d80968bc7b2f55f05
entity_id: binary_sensor.lr_window_sensor_ias_zone
domain: binary_sensor
then:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.vacation.state }}'
else:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.pre_heat.state }}'
- conditions:
- condition: trigger
id: Normal Heating
sequence:
- if:
- type: is_open
condition: device
device_id: a8155de384e2c41d80968bc7b2f55f05
entity_id: binary_sensor.lr_window_sensor_ias_zone
domain: binary_sensor
- type: is_open
condition: device
device_id: a8155de384e2c41d80968bc7b2f55f05
entity_id: binary_sensor.lr_window_sensor_ias_zone
domain: binary_sensor
then:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.vacation.state }}'
else:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.normal_heating.state }}'
- conditions:
- condition: trigger
id: Sleeping Heating
sequence:
- if:
- type: is_open
condition: device
device_id: a8155de384e2c41d80968bc7b2f55f05
entity_id: binary_sensor.lr_window_sensor_ias_zone
domain: binary_sensor
then:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.vacation.state }}'
else:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.sleep.state }}'
- conditions:
- condition: trigger
id: Heating Off
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_heater_thermostat
temperature: '{{ states.input_number.vacation.state }}'
- conditions:
- condition: trigger
id: Away for long
sequence:
- service: climate.set_temperature
data:
temperature: 5
target:
entity_id: climate.living_room_heater_thermostat
- service: input_select.select_option
data:
option: Heating Off
target:
entity_id: input_select.heating_schedule
default: []
mode: single
I am in the same situation as the michaelkrtikos, and even though I went through the suggested topic I still can’t really understand how to expose the missing attributes. I am running the latest firmware (1246-0100-01200120.0002_(2B60A723)). I have thought If I enable quirks then I will be able to see more controls or sensors but no. I am running HA in a linuxserver docker image. I am new to HA, but I have managed to add several zigbee devices and use them through the GUI already, is it possible that this device can only be controlled with scripts?
As you have seen in the above thred, there is not much that the device exposes to Home Assistant but what it does, is certainly enough. So, if you are able to change the temperature with the thermostat card, that’s all you need. Unfortunately, the device cannot be turned off with a switch entity but you can definately turn the temperature to 5 degrees that will essencially cool down your radiator completely (like it’s off)
I can manually change the temperature through GUI, but I can’t set up any automation like for example, I do with a smart plug, because there are only two actions that appear in the list: HVAC mode, which doesn’t work through GUI anyway and pushing the identify button.
I would like to set up a simple schedule: turn the radiator on around 6 AM so, the room would heat up until the temperature would rise up to 24 degrees, then close down at about 9 AM when we all leave to work. The same thing would happen in the afternoon as well, until 10 PM, when the radiator would close down again. Closing the radiator down completely wouldn’t be necessary, my old thermostat was set up to 17 degrees maximum for the “off” period.
At 6:00 it raises the temperature to 24 degrees and then at 9:00 it turns it down to17 degrees. The same happens in the afternoon at 17:00 and turning down at 22:00.
From the above code, you can set the times as per your convenience and then you need to change the thermostat entity to yours. Just replace: climate.living_room_heater_thermostat with the entity of your TRV.
I believe those are perfect examples where the user who wants that specific function exposed in ZHA for this product would need to submit a new “device support request” issue to the ZHA Device Handlers repository on GitHub for ZHA developers to be able to add/update a custom “quirk” to a future version of the ZHA integration.
As a user of the ZHA integration it is important to know that while with only a few limitations, most devices should in theory be able join/pair directly to any Zigbee solution regardless of brand and manufacturer, but because the Zigbee specifications allow for manufacturers to add custom non-standard features/functions to new products that are impossible for developers to predict and add support for in advance, (which is one of the readon why commerical hubs only whitelist their own brand of devices that have been tested and confirmed working) thus users of all and any Zigbee solutions that is not from the original manufacturer need to be aware that not all functionality will always be supported out-of-the-box and devices that use custom “manufacturer-specific extensions ” to add functions and features not included in the standard Zigbee specifications will need device-specific code in the form of Zigbee device handlers/converters that decode/translate all custom features for them to fully work. For ZHA and Zigbee that process is described here → Zigbee Home Automation - Home Assistant and Support new devices | Zigbee2MQTT respectively.
To summarize the basics, since the developers can not buy and test every Zigbee device out there themself, you as the end-user who want to use a specific new device need to buy and test joining/pairing that new device yourself to the Zigbee solution you want to use before then submit a device support request with device signature + diagnostics information in order for the developers to decode/translate that data and be able to add those custom parameters and attributes in a new custom device handler/converter that is specific to that new device. So if a device that uses custom “manufacturer-specific extensions ” to add new non-standard functions and features is supported in one Zigbee solution but not another then that simply means that an end-user and a developer have not yet collaborated to create a new custom device device handler/converter for that specific device in that Zigbee solution.
Hello, I am a beginner Home Assistant user. I recently bought a set for the living room - two Danfoss Ally heads and a Danfoss Ally room temperature and humidity sensor. The devices are connected to the HA via the Sonoff Zigbee 3.0 USB Dongle-E Plus gateway. Unfortunately, I don’t know how to make the thermostatic head read the temperature from the room sensor. Can anyone help?
The Danfoss has an integrated temperature sensor. Do you need to “replace” this with an external one? If that’s the case, then you can find a post here: Danfoss Ally TRV working with remote temp sensor
I find the integrated sensor of the danfoss ally to be ok for that use. At the end of the day, for setting automations this should be enough!
Thank you for your answer. I’ll check out this thread. I would like to use your (for bacsom) automation, but how can I make it work for all the heads I have at home, not just one?
You can include more than one entities in the automation. What i suggest is: copy the automation code from above, and go Settings->Automations & Scenes->Create Automation and select Create New Automation. The Automation editor UI will open but on the upper right side click the 3 dots and select: Edit In Yaml.
Paste the code there, and now go again to the 3 dots and select: Edit in Visual Editor.
You should now see 4 triggers and 1 choose action with 4 options. In each option a service is called to set the temperature to spesific value. You will see a bubble saying “living_room_heater_thermostat” (this is from my code but yours can be named differently. Just delete it all and select your thermostats. You can add as many as you want there.
If you have more than one, when the automation will trigger, all the selected thermostats will change temperature at once.
You mentioned that you are a beginner but i would definately suggest to play a bit with the automations as you will learn very quickly how it works… There are tons of things you can do in automations using conditions or If/then actions.
For example, if you have presence sensors in your rooms you can apply a logic to raise the temperature only in the rooms that are occupied. The logic would be:
When the time is 22:00 (trigger), if presence in the living room is detected (condition), then set temperature to 24 degrees. Else, set temperature to 20 degrees.
In the above we used the time as a trigger with presense as condition but nothing is stopping us to use presense as a trigger instead of time. Lets say you set temperature to stable 20 degrees and when you enter the room (presense is now the trigger) it can raise to 24 degrees.
Hi, we’ve just installed a single danfoss (hive)trv to replace a broken one, but we’re not ready to use it to control the heating yet, were doing a refurb and that will come later but threw on the danfoss because we had them waiting.
Our heating is controlled through a nest at present (also in HA).
But my issue is I can’t get the current temp from the TRV to display on my room heating cards, when it asks for entiry I only have three options HVAC action, battery state and temp offset.
But the thermostat card shows the current and target temp and I can pull my nest current temp no probs.
So what am I doing wrong? I’m obviously missing something because the data/sensor is there.
Thnks