Use an input boolean and input slider to turn a light off after x minutes

Hello, I was wondering if there was a way to put an input boolean and an input slider in a single box on the web interface. Then I can adjust the slider to a value between 1 and 60, and if I press the boolean button, it will take the slider value and turn a specific light off after the minutes specified by the slider.

If possible, after the minutes have passed, I want the input boolean to go back to off. And it would also be nice to be able to hit the boolean button again to cancel the timer.

Is what I’m trying to do possible?

See if this thread helps you - it includes a couple of references to another thread that you should look at also.