I was playing with this last night and I could get it to work correctly
I have a timer which display the time remaining as HH:MM ie 02:43, I want to add this to the current time to give the time it will be ready.
I have tried converting the ātime remainingā to a time stamp and adding them together, but it didnāt work.
I have tried getting the now() time as HH:MM and adding this to the ātime remainingā time, but that didnāt work.
I know this should be straight forward but I cannot fathom it out
Can anyone help?
The code below is the code for the ātime remainingā
{% set tempsum = (states.input_number.hot_tub_required_temp.state | int) - (states.sensor.outside_hot_tub_ds18b20_2_temperature.state) | int %}
{%set tempsum = tempsum / (states.input_number.hot_tub_heating_rate.state | float) %}
{% set tempsum = (tempsum * 3600)|timestamp_custom("%H:%M", False) %}
Thank you for the reply but it will still not give the correct time
The first value is now(), the second is the ātempsumā value before itās added to the current time, the third is the value of ātempsumā. The expected value would be 17:55 (17:01 + 54 min)
I use the else to give me a far off date just in case the calculated rate of change of the food temp stalls out (which happens when smoking on a smoker - the infamous āstallā) so I donāt get an erroneously optimistic time.
if you canāt get the timedelta to work then you can use this template and it should do what you want.