How to read TRV current temperature in helper

Hello,

I’m trying to create a helper that will simply calculate the offset between the reported temperature on a TRV and the temperature on a separate sensor. The idea being that the TRV’s offset can then be updated so it thinks it’s the same temperature as what the separate sensor is reading.

I’m pretty new to helpers and I’m struggling to access the TRV’s temperature. I can get the separate sensor’s temperature with sensor.sensor_name_temperature but when I try sensor.TRV_name I am only offered the following options

The device is connected using Z2M but in the HA device it looks like this. The value I’m trying to access is the ‘current temperature’ value. How can I access that using the helper?

If I can’t get this to work I can find a way using service calls through AppDaemon to request the information, but I thought it would be neater to use a helper that would not be pinging the TRV for info all the time and only trigger anything when the offset between the already-reported values changed. I’m also open to alternative ways to do this, but it would be nice to learn how to use the helper.

Thank you

Are you using helpers/template sensors?

when i ran into the problem to get a Costum Sensor, this video helped me a lot to understand it / to create costum sensors via “Templates”.

Templates and Custom Sensors in Home Assistant - How To TUTORIAL

1 Like

Thanks for recommending this video. Not long into the video and I think it’s the state attribute that I need to access. I’ll have a play later
image

yes … this is my template sensor for reading current_temperature from …

1 Like