Run automation command to next hour

Hello :slight_smile:

I want help. I Have automations who turn off deepsleep on esphome. But deepsleep countdown time when deepsleep start. If i turn deepsleep 15:02 esp wakeup 15:32,16:02 etc. But i want create automation who wake up next hour. If i use start deepsleep such as time 15:27 automations run command for sleep to 16:00. If i run deepsleep 13:55 automations run command to sleep to next hour. Sleep and wake up i have done with mqtt on esphome. Can you help me ? :slight_smile: Thank’s