"forward timer" to record running time?

Hi all,
is there a possibility to configure a kind of forward timer in Home Assistant, which shows how long a washing machine (via smart plug) has been running? When the washing machine turns on, there should be a time of 0:00:00 running in the dashboard, and stop when the washing machine is off.
I’ve read about history stats, but as far as I could see, you need a time period for those (“how long did the washing machine run today?”), and I’m interested in the time for one wash cycle. If there were multiple washes in a day, I want the time to run separately for each wash and not show a total per day. Ideally, the wash cycles should be stored with the duration.
Does anyone have an idea?

Thanks in advance for any hint and best regards
Rado

I think your best option is a counter that counts up every second with an automation (or every ten seconds, 10 seconds if you want to be more gentle on the system).
Then create a template sensor that converts the seconds to HH:mm:ss format.

Thank you! Do you have an idea how such a template could look like?

Look at the timer integration:

You can create a timer then set it running when say, the washing machine starts. Then end it when it finishes etc. A number of services you can use with this - all in the docs.

{{ states('counter.counter') | int | timestamp_custom("%H:%M:%S",false) }}

Timers count down, not up

1 Like

try this

1 Like

Sorry :frowning: misread the requirement!