Why? This over complicates the solution a ton. Without it, it’s a single automation. With it, it’s a chicken egg scenario with a feedback loop. Trying to counter said feedback loop would be painful.
I want to have visual representation of how much time is left and to be able to extend it easily (just increasing the time left of the slider). I know it overcomplicates things, but it would make things very understandable for the users (aka my wife and kids).
Welp, I doubt anyone will write the code for you in this circumstance. You might as well try this on your own first.
integrate sensor.time
make an automation that updates every minute using sensor.time and check to see if the timer is active. If it is active update the slider.
make an automation that updates the timer (only if the timer is running) if the slider is moved. Use a condition that checks what started the timer using the context property on the state object. You’ll need to reverse engineer the properties in the context property. There are 3 properties, one of them will indicate that the other automation is updating the slider position. If that is the case, don’t fire this automation.
Make a script that starts the timer based on the sliders position.
Place the script & the slider into a lovelace card.
OR (the easy solution)
Make a single script that starts the timer based the sliders position.
Place the script & the slider into a lovelace card.
How about just having a simple automation with a time_pattern trigger of every minute, and have it call input_number.decrement (assuming the step parameter of the input_number is the default value of 1)? No timer required.