Is there a way to define a template sensor (without an automation) that can tell me how long a door remained open? it will be updated for the next event (open/close cycle).
So for example:
Door was opened last for 23 minutes. for the next cycle it can be less or more, will update when there is a new event. While the door is open and not yet close, the sensor may still have the last value.
I can do it with a couple of automations and input.tezt to use as variables, but i am wondering if there is a more direct way to do it with a template sensor. Or with the history_stats integration
thanks
1 post - 1 participant