Thank you for that hint. I’ll give it a try with an additional else clause.
Trigger-based template is also a very good hint. I’ll give this a try also.
I already have a working solution by using a input_date helper and a automation. But I was trying to get rid of this due to the input helper. I dont want to change somethin manually.
My Plan is to show the current running time of the washingmaschine or dishwasher
For this I have a Binary Sensor which is monitoring the energy of a power plug
Zigbee Plug: “sensor.waschmaschine_power”
Template Binary Sensor to monitor washing state: “binary_sensor.waschmaschine_status”
Automation which detects the change to “on” state of washing maschine and fires two services
input_datetime.set_datetime: “input_datetime.waschmaschine_eingeschaltet”
counter.increment: counter.waschgaenge
To calculate the time I have a history stats sensor which calculates the time from start: “input_datetime.waschmaschine_eingeschaltet” to end: now() and store it as “sensor.spuelmaschine_laufzeit”
If you’re interessted in code I can manage to share all code snippets.
I’ll keep you up to date on my finding regarding my initial question.
UPDATE: Sorry I would have shared some more pictures of my settings, but my account is by now not allowed to uploade more pictures.
Sorry, new users can only put one embedded media item in a post.