Allow turning off switch only after x minutes

Tags: #<Tag:0x00007f73a64b17b8> #<Tag:0x00007f73a64b1600>

I have a Shelly Plug S and I can turn it on or off from my dashboard. However, I am controlling a laser printer with it and I’ve heard that is is not good for laser printers to get turned on or off to fast. (they have to warm up.) How can you limit a switch so it can only switch state every 15 minutes. So I’ve turned on my printer I have to wait 15 minutes before I can turn it of.

Thanks

There’s probably a way to do it with the switch last changed attribute and this:

I think that will do the job,
I’ll try it
Thanks

instead of exposing your switch in frontend add an input_boolean.
then create 2 automations.
one that reacts to its off state.
it should have a state condition with your switch as an entity and for; minutes: 15
and it should turn on the switch.

and other that turns off your switch if input_boolean's state changes to off.