Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103310

Template sensor to tell me how long a door remained open for the last time

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 103310

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>