I would like to create a running time display in the dashboard for my gas boiler.
I once managed to create template sensors that show me the runtime in hh:mm:ss.
But - I can only manage to add up the running time.
I would like the running time to start again at 00:00:00 every time the boiler start up.
It would be nice if I could save the runtime values, but I think I should also find out about doing that via the history.
What I would also like to have is a higher refresh rate. Currently the counter is only updated every 60 seconds.
And finally I would like to combine the gauge card with the hh:mm:ss display.
So gauge display but hh:mm:ss as values and not 0.xx as hourly value.
Like in the picture montage here:
I tried to use information from various posts for my project.
These are the templates that I created in the configuration.yaml:
- platform: template
sensors:
laufzeit_therme_rounded:
friendly_name: "Laufzeit Therme Stunden-Minuten gerundet"
unique_id: "history_laufzeit_therme_rounded"
value_template: >
{{ (timedelta(hours=states('sensor.laufzeit_therme') | float(0)) | string)[:-7] }}
- platform: history_stats
unique_id: "history_laufzeit_therme"
entity_id: switch.og_bad_therme_schalter
name: history_laufzeit_therme
state: 'on'
type: time
start: '{{ as_timestamp( now().replace(hour=0).replace(minute=0).replace(second=0)) }}'
end: '{{ now() }}'
Why I want to do this:
All my radiators are smart and influence the control of the gas boiler.
My experience is that the gas boiler runs on average twice a day for 2-2.5 hours.
However, it has happened a few times that the gas boiler runs longer if, for example, a temperature sensor is stuck.
That’s why I want to know at a glance how long the gas boiler has been running since it was last switched on.
I’m currently doing this with a workaround and automation and showing how many quarters of an hour the gas boiler has already been running.
This serves the purpose, but a running time counter in hours and minutes obviously looks more elegant.
I can also use the running time counter for other areas, for example when cooking, as my stove and oven are also smart. As well as a dishwasher and washing machine.
Thank you in advance for your help!