# Better \[timeperiod\] usage graphs for devices

**URL:** https://community.homey.app/t/better-timeperiod-usage-graphs-for-devices/100866
**Category:** Ideas & Suggestions
**Created:** [January 12, 2024, 6:29am UTC](https://community.homey.app/t/better-timeperiod-usage-graphs-for-devices/100866 "2024-01-12T06:29:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sorted.bits](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sorted.bits/32/149039_2.png) [@sorted.bits](https://community.homey.app/u/sorted.bits)
#### Post date: [January 12, 2024, 6:29am UTC](https://community.homey.app/t/better-timeperiod-usage-graphs-for-devices/100866/1 "2024-01-12T06:29:18Z")

</div>

I seem to have a lot of devices which support an ‘Energy’ insight. This is a lifetime number, which for my dryer was a value that changed from 237kWh to 254kWh this week.

I would love to be able to put this into graphs, showing a number for each day, instead of an ever upward travelling line.

 ![Screenshot 2024-01-12 at 07.22.05](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/70184341cb3612fb146b33727c5ccaab901d98b7.png)

I saw the Power by the hour app, which has the same functionality, but this means that I need to have loads of those devices in my system. It would be cool if this could be part of the already existing device and available through the regular insights.

---

<div class="post-metadata">

### Author: ![DirkH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkh/32/78952_2.png) [@DirkH](https://community.homey.app/u/DirkH)
#### Post date: [January 12, 2024, 12:18pm UTC](https://community.homey.app/t/better-timeperiod-usage-graphs-for-devices/100866/2 "2024-01-12T12:18:25Z")

</div>

Hi @sorted.bits ,  
If you don’t want to use Power By The Hour ‘devices’ you can do it on your own, but you need two variables for each power meter / machine  
_When…_ **It is 23:59**  
_Then…_  
**Calculate _MyWashingMachineEnergyPerDay_ as _{{ (WashingMachine)Energy - MyLastWashingMachineEnery }}_**  
**Set _MyLastWashingMachineEnergy_ To _(WashingMachine)Energy_ with 3 seconds delay**

You just need one simple or advances flow. I am not sure, if the delay is needed. I use it to ensure that the **MyLastXxxEnergy** variable is set after the calculation. As I understood it is not guaranteed, even if looks to be later in the flow.  
Here I used very long names for better reading. You may use abbreviations. And my variables start with **My** in order to see in Flows that it is a variable and not the tag of a device or similar  
**(WashingMachine)Energy** means the energy tag of the powermeter connected to your washing machine.
