Switchbot & Bed Warmer

Hello everyone,
Hoping someone can help me automate my heated bed.
I have a bed warmer with a button and a switchbot attached, and I can send the turn switch off to switch.bedwarmer_x1_state to toggle the switchbot to press the button.
The warmer has 4 levels, so 0-4, and I’d like to be able to turn it to the level I’d like and turn it off from whatever power level it’s at.
The device also powers off after 6 hours, so it would be nice if it reset in HA within the same automation, but if not then I can use Node-Red to set it to 0 or off after 6 hours.
Eventually I’d like to be able to tell Alexa to do this as well, but I imagine that will be done through Node-Red by manipulating whatever comes out of this.

I’ve started attempting to use a input_number helper but I’m not 1010% sure how to go about the automation.
Anyone done this before or have any ideas?

Thanks!