I’d like to create an automation triggered by changes of a template sensor. The action should depend on the value of this template sensor:
- if the value has been below A for at least 10 minutes, call service X
- if the value has been between A and B for at least 10 minutes, call service Y
- if the value has been above B for at least 10 minutes, call service Z
I’ve seen the documentation for Scripts: Choose a Group of Actions but I’m unsure how to add the 10 minutes delay to the conditions and to ensure that it’ll never end up hanging in a limbo state.
As an explanation: I’m trying to optimise my heating based on the average differences between target room temperatures and current room temperatures. So this average value changes very frequently, usually only in tiny steps but it can fluctuation and I don’t want to deal with fluctuations around one of the “border” values by using the above 10 minute delay.