Setting a scene using a variable

I have a range of “input number” helpers, along the lines of “input_numer.coffee_delay, input_number.cooking_delay” which are dynamically altered depending upon time of day, daylight, number of people in room, how much power is being drawn in kitchen, time of year, weather, etc

These is used for various things, including how long lights are automatically turned on/off whilst a particular “room state” is active.
Rather than have a separate routine for each state, I’d like to set a helper - “input_number.kitchen_delay” to the value of “input_number.STATE_delay” which is passed to a general routine which turns the lights on or off after the required number of minutes is reached. (unless something else happens, but that’s not important to my question).

anyway; TLDR. Is there a way to set an entity value to the value of a different entity, using “scenes”?
I’d like to keep the entire thing in one scene if possible, rather than an automation that detects when a scene is activated and assigns a value.

THOUGHTS:
I could use a script which duplicates the “activate scene” service? that will allow me to use templates - which scenes don’t?
It would mean re-writing a LOT of code, unfortunately, so I’d like to avoid that if possible.

Scenes do not support templates.

So yes you have to use scripts instead.

Thanks.

I’m going to use a boolean helper - set it to to “true” inside each scene.
Then I’ll use an automation to run a single script that sets input_helper.kitchen_delay, and resets the boolean to “false”
That way, if I ever add more STATEs I can just alter the one script to add an extra option