# Cheapest hour does not work over midnight

**URL:** <https://community.homey.app/t/cheapest-hour-does-not-work-over-midnight/144161>\
**Category:** Energy\
**Created:** [October 15, 2025, 6:32pm UTC](https://community.homey.app/t/cheapest-hour-does-not-work-over-midnight/144161 "2025-10-15T18:32:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sundlof](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sundlof/32/51033_2.png) [@Sundlof](https://community.homey.app/u/Sundlof)\
**Post date:** [October 15, 2025, 6:32pm UTC](https://community.homey.app/t/cheapest-hour-does-not-work-over-midnight/144161/1 "2025-10-15T18:32:00Z")

</div>

Or does it?

I can not get this to work, I want to trigger a flow when there is the cheapest of the 2 following hours between 22:00 and 06:00 (10:00 PM and 06:00 AM). I have tried the Energy cards.

One solution is to run **Every hour** –\> **If it is one of the 2 cheapest hours between 22:00 and 06:00** –\> **Do something**. This one never triggers, had it activated for weeks.

Another solution is When **Energy Price is changed to period of 2 hours between 22:00 and 06:00 with todays lowest average price** , but this one never triggers. Right now I have it set up two separate where one is 22:00 to 00:00 and the other 00:00 to 06:00. This works but it is not ideas when I want to have the cheapest hours all of these hours.  
Homeys other cards does work over midnight, for example **And Time is between xx:xx and xx:xx** , if the first time is before the second it is the next day.

Another related question I have is, how do I find the cheapest hours between these times (22-06). The cards only triggers (supposed) IF todays lowest prices are within these times. I want to find out the cheapest hours between these times even if there are cheeper hours outside of these times.

Any ideas on this?
