hi All,
I am almost pulling my hair trying to get some basic time calculations in HA. I made quite some progress by reading through the EPIC post on time, but I am simply blocked right now.
I am trying to get a template to make a string in format HH:MM:SS
Here is my code:
{{strptime(states('input_datetime.coffee_start_workday'),'%H:%M:%S')- strptime('30', '%M')}}
If the 'input_datetime.coffee_start_workday is let’s say 06:37:00 (no date on it), then the result is 6:07:00
While calculation is correct, the format is not what I need: I was expecting 06:07:00
What am I doing wrong/ how shall I do it?
Thanks in advance