Input Select Help

Here is my current setup. 3 radiators connected to Sonoff S20’s flashed with tasmota. I then have 3 scripts and an Hours input slider to put the radiator on for a timer for a dynamic number of hours. Is there anyway to combine the three scripts to an input select? how do i do that?

image

Config

# Input slider (Hours)
input_number:
  hours:
    name: Hours
    icon: mdi:clock
    min: 0
    max: 12
    step: 1

#Switches
#Bedroom Radiator
  - platform: mqtt
    name: "Sonoff01"
    command_topic: "cmnd/home/sonoff01/power"
    state_topic: "stat/home/sonoff01/POWER"
    gos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

#Man Cave Radiator
  - platform: mqtt
    name: "Sonoff03"
    command_topic: "cmnd/home/sonoff03/power"
    state_topic: "stat/home/sonoff03/POWER"
    gos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

#Living Room Radiator
  - platform: mqtt
    name: "Sonoff04"
    command_topic: "cmnd/home/sonoff04/power"
    state_topic: "stat/home/sonoff04/POWER"
    gos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

#Scripts
script1:
  alias: LR Radiator Timer
  sequence:
    - service: switch.turn_on
      entity_id: switch.sonoff04
    - delay: '{{ states.input_number.hours.state | int }}:00'
    - service: switch.turn_off
      entity_id: switch.sonoff04

script2:
  alias: MC Radiator Timer
  sequence:
    - service: switch.turn_on
      entity_id: switch.sonoff03
    - delay: '{{ states.input_number.hours.state | int }}:00'
    - service: switch.turn_off
      entity_id: switch.sonoff03

script9:
  alias: Bedroom Radiator Timer
  sequence:
    - service: switch.turn_on
      entity_id: switch.sonoff01
    - delay: '{{ states.input_number.hours.state | int }}:00'
    - service: switch.turn_off
      entity_id: switch.sonoff01

#Automations to stop scripts
#LR timer
  - id: 1x
    alias: Turns off LR timer
    trigger:
      platform: state
      entity_id: switch.sonoff04
      from: 'on'
      to: 'off'
    action:
      service: homeassistant.turn_off
      entity_id: script.script1

#MC timer
  - id: 1x
    alias: Turns off MC timer
    trigger:
      platform: state
      entity_id: switch.sonoff03
      from: 'on'
      to: 'off'
    action:
      service: homeassistant.turn_off
      entity_id: script.script2

#Bedroom timer
  - id: 111x
    alias: Turns off Bedroom timer
    trigger:
      platform: state
      entity_id: switch.sonoff01
      from: 'on'
      to: 'off'
    action:
      service: homeassistant.turn_off
      entity_id: script.script9

Thanks

can any1 help?

you can try creating an input select with the options you want, and then create an automation that gets triggered on a state change of the input_select. the service called would be the scripts