How set in esp device deepsleep mode form specific hour to other hour ?`

Hi,
I have a smart Switch with esphome and i want for example to set in spesfic hour into deepsleep mode and in some hour to wake up

anyone can help me?
thanks

What did you look at and try so far?

nothing
can you help how start?
have option to control the deep sleep from HA?

Esp boards use esphome. Esphome has a whole site full of documentation that teaches you how to do these things and gives you lots of examples. Thats where you need to start.

You do realize that its kind of pointless to add deep sleep to a smart plug, right? You can already turn it On and Off. Whats the point of putting it to sleep? The 0.001 watts you save while sleeping isnt going to save you money or save the rain forest…