# \[APP\]\[Pro\] Power by the Hour: Insights per hour, day, month and year

**URL:** <https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535>\
**Category:** Apps\
**Tags:** app, tools\
**Created:** [November 10, 2019, 10:06pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535 "2019-11-10T22:06:03Z")\
**Posts on this page:** 20\
**Page:** 81

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 12, 2023, 9:13am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1636 "2023-07-12T09:13:11Z")

</div>

You can already achieve what you want with this flow:

 ![2023-07-12](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/9/19024c565b7d819baa8f05f105e9d82a1305b01b.png)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 12, 2023, 9:35am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1637 "2023-07-12T09:35:29Z")

</div>

> [@Marius\_Stensrod](#):
>
> Yeah, that works. But it is not nescessary to trigger the card twice, because the price does change only one time in a hour. It would be great if you could prevent it

Changed in the new version 5.6.8: [Power by the Hour App for Homey | Homey](https://homey.app/a/com.gruijter.powerhour/test/)

@Marius_Stensrod @Satoer Please test and let me know if I can push it to stable.

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [July 12, 2023, 12:29pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1638 "2023-07-12T12:29:28Z")

</div>

> [@Gruijter](#):
>
> @Marius_Stensrod @Satoer Please test and let me know if I can push it to stable.

I have testet it. Now it only trigger ones. That is great! As of my opinion, you can push the update to stable.

---

<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:** [July 12, 2023, 12:55pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1639 "2023-07-12T12:55:28Z")

</div>

I remember to have read somewhere why some of my data is negative and the beginning of a new month, but I cant find that answer now. For example is the cost -312 SEK the first day of a new month. Do you know, or do you need more detailed info about what I mean?

---

<div class="post-metadata">

**Author:** ![Patric\_Hedin](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patric_hedin/32/56421_2.png) [@Patric\_Hedin](https://community.homey.app/u/Patric_Hedin)\
**Post date:** [July 12, 2023, 1:53pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1640 "2023-07-12T13:53:16Z")

</div>

Since you provided a workaround I’ll skip that feature request but I’ll add another one to your request channel and that’s the possibility to retrieve the prices for today/tomorrow as JSON (same as what the WHEN-cards return) 😉

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [July 14, 2023, 11:55am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1641 "2023-07-14T11:55:47Z")

</div>

Could it be the action card of DAP device for new prices for tomorrow isn’t working anymore? New prices for tomorrow (Zonneplan) are known in the app, but my flow with notification of this new prices isn’t triggered. For what I remember for a few days now…. 🤔

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 14, 2023, 1:30pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1642 "2023-07-14T13:30:58Z")

</div>

Mmh. Have to check that. I changed double triggering in last version. Maybe tomorrow trigger broke.

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [July 14, 2023, 4:16pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1643 "2023-07-14T16:16:44Z")

</div>

> [@Gruijter](#):
>
> I changed double triggering in last version.

I hope you don’t have to change it back to double triggering again 😅

---

<div class="post-metadata">

**Author:** ![Tycho](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tycho/32/16864_2.png) [@Tycho](https://community.homey.app/u/Tycho)\
**Post date:** [July 14, 2023, 6:37pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1644 "2023-07-14T18:37:37Z")

</div>

I have the same issue. The app has the prices for tomorrow, but my flow to store the prices in a variable does not work anymore. Now my script that creates the planning for charging my car cannot look further ahead than midnight.

It would actually be nice if a JSON with all prices for today and tomorrow would be available as a device capability. That would remove the need to catch the prices and store them in a variable myself.

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [July 14, 2023, 7:35pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1645 "2023-07-14T19:35:43Z")

</div>

@Tycho The JSON with all prices is already implemented. Not as capability, but maybe this implementation is good for your purpose. By using this, you can eliminate your flow to store the prices for tomorrow…

> [@\[APP\]\[Pro\] Power by the Hour: Insights per hour, day, month and year](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1556):
>
> Not really a new card. Just a new option added to it. Should trigger every hour, but havent tested it thoroughly.

I myself still have to simplify my flows and scripts with this new feature…

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [July 14, 2023, 7:38pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1646 "2023-07-14T19:38:49Z")

</div>

> [@Tycho](#):
>
> Now my script that creates the planning for charging my car cannot look further ahead than midnight.

How did you implement this planning? I’m using a calendar for this, that I fill manually, but I’m investigating ways to automate this.

---

<div class="post-metadata">

**Author:** ![Tycho](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tycho/32/16864_2.png) [@Tycho](https://community.homey.app/u/Tycho)\
**Post date:** [July 15, 2023, 8:29am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1647 "2023-07-15T08:29:20Z")

</div>

Thanks for the suggestion. It’s a great feature and it could work, but I would still have to store the prices since my planning is triggered by connecting my car to the charger so I need it at that point in time. I trust that the bug will be resolved soon, so I will just wait for that.

I implemented the charge planning with a combination of Advanced flows and Homeyscript.

-When I connect my car, an Advanced flow triggers that calculates how many hours I need to charge.  
-The flow calls a Homeyscript to calculate the cheapest hours and stores the planning in a variable  
-Every hour the Advanced flow checks if this is an hour in which it needs to charge. This triggers another Homeyscript that compares the current hour with the planning that I stored earlier. If yes, then charge.  
-If my car is connected when new prices for tomorrow are received, then re-evaluate the planning and see if there are cheaper options available.

---

<div class="post-metadata">

**Author:** ![micros43](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/micros43/32/76481_2.png) [@micros43](https://community.homey.app/u/micros43)\
**Post date:** [July 18, 2023, 3:17pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1648 "2023-07-18T15:17:07Z")

</div>

I havn’t recieved new prices for tomorrow for the last couple of weeks now. As said over here, the prices is avaible in the app, but not triggering. Any fix for this?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 18, 2023, 3:40pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1649 "2023-07-18T15:40:56Z")

</div>

> [@micros43](#):
>
> Any fix for this?

> <https://github.com/gruijter/com.gruijter.powerhour/issues/133#issuecomment-1640200238>
>
> Since a couple of days the card "New prices for today/tomorrow" is not triggered… when new prices is avaiable. 
> I use that card and the JSON with prices in my logic for many things, could you please have a look?

---

<div class="post-metadata">

**Author:** ![Steino](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steino/32/78995_2.png) [@Steino](https://community.homey.app/u/Steino)\
**Post date:** [July 18, 2023, 8:23pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1650 "2023-07-18T20:23:08Z")

</div>

Thanks!!

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [July 22, 2023, 9:40am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1651 "2023-07-22T09:40:37Z")

</div>

Hi, Sorry totally missed this message 😅  
Just installed it. Testing it today.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [July 23, 2023, 1:24pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1652 "2023-07-23T13:24:26Z")

</div>

Hi @Gruijter ,

any idea what is going on ?

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/2/a22095a206b1bf32e4303b448ae17a07078cc565.png)

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/7/37c7a616ad647b6943ac4aaad1836f3d89632ef3.png)

Diag:  
b741a458-5b60-4716-ac44-e78776b6a5d4

…and now it disappeared ?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 23, 2023, 1:32pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1653 "2023-07-23T13:32:43Z")

</div>

Looks like the source devices were gone. Did that app get an update maybe? Or did it crash?  
Anyhoo, PBTH will retry every hour, so that is why it came back automatically.

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [July 25, 2023, 8:44pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1654 "2023-07-25T20:44:17Z")

</div>

Hello Gruijter, i have a new question about the same card as mentioned before “cheapest hour”. I use this car to select the cheapest hour between two times. I have tried this card a while, and your fix for the double trigger works really great. But when it is more hours with negative prices (image attached), it trigger every hour with negative price, and i really want to fetch the lowest. Can you provide a remedy for det calculation?

 ![Screenshot_20230716_134419_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/b/9ba4127ecaf1c5305cfc9322e7214c24a19f5792.jpeg)

Kind regards  
Marius

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [July 25, 2023, 9:31pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1655 "2023-07-25T21:31:19Z")

</div>

> [@Marius\_Stensrod](#):
>
> select the cheapest hour between two times.

So which card exactly are you using for this? Can you share a screenshot of your flow?

[Previous page](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535.md?page=80)

[Next page](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535.md?page=82)
