Timer based smart plug

Hi
Could somebody please point me in the right direction.
This is what i am trying to do. The normal on/off works fine.
I would like to set the Timer enable to true then use the sliders to set the start and stop times and set the Timer enable back to false once the time cycle has completed. This could be expanded to include repeat / Days but lets not worry about that for now :slight_smile:
I have the folowing config so far but cannot work out how to do the automation part
SMPlug

input_number:
starthour:
name: Start Hour
icon: mdi:timer
initial: 6
min: 0
max: 23
step: 1

startminutes:
name: Start Minutes
icon: mdi:timer
initial: 30
min: 0
max: 59
step: 1

stophour:
name: Stop Hour
icon: mdi:timer
initial: 6
min: 0
max: 23
step: 1

stopminutes:
name: Stop Minutes
icon: mdi:timer
initial: 00
min: 0
max: 59
step: 1

input_select:
scene_rc1:
name: Timer Enabled
options:
- ON
- OFF
initial: OFF

This produces the following in states
input_select.scene_rc1
input_number.starthour
input_number.startminutes
input_number.stophour
input_number.stopminutes
switch.smart_plug_1

I assume this will require a template and or the use of automation and now i am lost

Many Thanks

I would look at the alarm clock thread for some inspiration if I was you.