I’ve written an automation that is trying to overcome the terrible temperature recording you get from TRV’s because they are so close to the radiator.
The TRV has a ‘temperature offset’ which can be used to alleviate this problem to some extent, but its fixed value that you don’t usually change much. This means if I set it to a negative offset, whilst the radiator is on, its more or less ok. But when the radiator is off, the negative offset makes the room appear colder than it is.
I also have a separate temperature sensor in the same room, so i came up with the idea of writing an automation that fires every time the TRV reports a temperature change.
What the automation does, is checks what the temp sensor thinks the temperature is, and adjusts the TRV’s offset value dynamically so the TRV’s temperature now matches.
Its not perfect for a number of reasons:-
-
The temp sensor reports within an accuracy of 0.1 degrees, but the TRV offset value is only in whole degrees, so it’s never going to be completely accurate.
-
The biggest issue however, is that the automation fires after the TRV temperature has changed, so imagine this scenario:-
Room sensor says temperature is 18 degrees
TRV says its 14 degrees, and has a current offset value of -4 degrees
The automation will correctly deduce that the offset should be zero, so both the TRV and room sensor think its 18 degrees.
However, whilst I can change the offset immediately, the ‘last recorded’ temperature in Home Assistant stays at 14 until the next temp change is sent with the revised offset.
So the temperature is always displayed as one ‘behind’ the currently calculated offset.
I can solve this manually by waking up the TRV by touching the touch pad on the top and it immediately sends its current temperature (with the corrected offset) to HA, but is there a way of doing his in an automation.
There seems to be two possible options:-
- Somehow request the device to send its ‘current’ values (I’m using Zigbee/ZHA)
- Write a value to the devices cluster attribute with the corrected temperature. ← This I have tried through the UI inititally, but I get an error saying the value is of ‘nonetype’ is not iterable:-