I’m currently looking to capture whenever I (not an automation) change the state of my TRVs - for example from auto to off. This changes the “hvac_mode” attribute, and is of course really easy to use as a trigger.
However, as a part of the automation, I want to capture the previous state of a different attribute - “temperature”. This corresponds to the setpoint of the TRV, and I’m wanting to store what it was if the HVAC Mode was “heat” - aka manual.
The problem is, when the TRV is in auto mode, the “temperature” attribute reports the setpoint in the TRV’s schedule, and when in “off” mode the attribute reports the frost protection temperature.
What I’m looking to do is capture the “temperature” attribute as it was before the HVAC Mode changed, so that if the previous mode was “heat”, I can store the setpoint in a variable for later use (some automations automatically change the HVAC Mode and temperature setpoint).
Any ideas?