Trying to remove input_number from now

hi, I try to create a template to have the time minus an input_number…

so far I have :

{{ states('sensor.time')|int - states('input_number.xyz')|int }}

but obviously it doesn’t work…

Thanks

{{ now() - timedelta(seconds=states('input_number.xyz') | int) }}

it work thanks ! but I need it in this format : “02:00:00” is it possible ?

ya

{{ (now() - timedelta(seconds=states('input_number.xyz') | int)).strftime('%H:%M:%S') }}

Thanks a lot !