Using a number helper as variable inside a datetime template?

No automation yet, trying to work this out in Dev Tools.

I don’t know how to use this: {{ states('input_number.hvac_co2_runtime_in_seconds') }} as the variable in this (Replacing the 1800 (seconds part)
{{ (as_timestamp(now())+ 1800 )|timestamp_custom("%Y-%m-%d %H:%M:%S") }}

{{ now()+ timedelta(seconds= (states('input_number.hvac_co2_runtime_in_seconds') | int) ) }}
1 Like

Oh nice, I didn’t even know about timedelta, that seems far easier to use. Thank You for your Help!