How to handle manual interventions on TRV's that are automated with schedules in HA?

I have a Sonoff thermostat that i have added through Z2M and automated with the Scheduler integration. This basically sends a different target temperature to the TRV on different times of day (e.g. colder during night, warmer in the morning, etc…) And this works quite well

But… And this really doesn’t matter if the TRV is controlled by the Scheduler integration or a build in Schedule helper in Home assistant…

What is the best practice to handle manual interventions on the TRV while having a schedule? How have you managed this ?

The problem is that, lets say you have a schedule that have the temp set to 18 from 00-08 and then 21 from 08-00 … You set the temp to 25 manually at 7:45 … Due to the schedule it sets it back to 21 at 8:00 … What would be nice, is if ther were a set time when a TRV’s has been manually set, say 4 hours, where the schedule is ignored, and after said 4 hours, the TRV is set to what it is supposed to be set to at the current time.

Can this be achieved with an automation somehow? Or is there another and better way?

Seeking suggestions, as i cant really wrap my head around how i would set this up with an automation

State condition with empty state and the for being 4 hours.
I believe that should work.

That should be the condition in the automation that sets the temperatures according to the schedule

Not sure i fully understand…

Is that with the expactation that the state is “heat” when the trv is heating ?

Sorry.
State condition on the attribute temperature of the climate entity.
That should mean the set temperature has to have been the same for four hours

Hmm that sounds like a relatively simple solution. Thanks for the tip, i will look further into that :smiley:

Keep in mind that this is a condition.
If you set the temperature 7:45 as in your example then it will remain on that temperature until 00:00.

You could use a wait for trigger, but that will probably fail at some point.
Or depending on how the automation is set up, perhaps you can trigger on temperature attribute being on for 4:01, this should let it pass the condition, and if the automation is set up in such a way then this could make it resume the schedule at time 11:46.