Wait until next hour

You might want to check the Piggy Bank app, designed with the Norwegian peak tariff system in mind, to automate turning devices off and on