I want to display the end-time for a washing cycle on my dashboard. The washingmachine gives me a ‘time left’ as an attribute which I have converted to a sensor for ease of use and other display purposes on my dashboard.
But I am a bit stuck on how to calculate an endtime based on the current time and the time left.
I can fetch the time remaining either as
{{ state_attr('sensor.wasmachine', 'remain_time') }}
or
states('sensor.wash_timeleft')
This gives me a string as such “0:30:00”, “1:02:00”, “0:00:00”… etc.
What I want to do to is add this time to a now() (using now().strftime("%H:%M:%S") for example) and get a time that displays when the washingmachine will be done. So if it’s now 12:00 and the timeleft is “0:30:00” the finnish time should be 12:30 (30 minutes later).
Any help will be much appreciated!