Garage door opened timer

Hi guys. I have automated my Garage Door through Home Assistant and ESP Home. I would like to add a stopwatch to show how long the Garage Door has been open, and it must reset when the door closes and start again when the door opens.
I have tried using History_Stats, but I don’t want to reset the stats with the garage door closing.
Any help will be greatly appreciated!

Not exactly, but I use the secondary_info on the entity card to show time since last changed.

for example:

  - entity: cover.garage_door
    secondary_info: last-changed
title: Garage Door
type: entities

I also have an automation (Node Red) that automatically closes the garage door. One of the conditions is time since last changed. Whether the door is open or closed is a separate condition.

You could simply use a timer, and use timer.start and timer.pause , called in an automation based on the door opening/closing. edit: i dum.

Why does something like this not work?

And is that actually what you want? If you actually want to do things based on the door being open for certain lengths of time, such as send a notification, you could simply make automations with a state trigger using the for: option.

1 Like

Thank you. It worked perfectly.