# Bug in insights diagram?

**URL:** <https://community.homey.app/t/bug-in-insights-diagram/75560>\
**Category:** Questions & Help\
**Tags:** insights, homey-pro\
**Created:** [January 25, 2023, 9:38am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560 "2023-01-25T09:38:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 25, 2023, 9:38am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/1 "2023-01-25T09:38:55Z")

</div>

This diagram shows a compressors On/Off state… looking at the latest 24h it looks as expected…

 ![Screenshot 2023-01-25 at 10.37.40](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/8/88e6c34e91a85151d6f6643014456d12781e26a9.png)

But when selecting 7 days or more the diagram does not make sense at all 😃  
The data is still 0 or 1…

 ![Screenshot 2023-01-25 at 10.37.30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/a/ba5cd68afab96dc44b43a56cbd4db22715ae7208.png)

Ideas? Bug that Athom needs to take a look at?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2023, 9:45am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/2 "2023-01-25T09:45:00Z")

</div>

Older values will get averaged.

---

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 25, 2023, 9:57am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/3 "2023-01-25T09:57:56Z")

</div>

so it will take the sum and divide on hours or something like that?

are you sure that’s the issue?.. looking at the scale its 0,0,0,1,1,1… feels like a config problem 😛

---

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 25, 2023, 9:59am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/4 "2023-01-25T09:59:25Z")

</div>

Also it still shows per hour… so I don’t think this is a sum problem…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2023, 10:02am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/5 "2023-01-25T10:02:48Z")

</div>

> [@Mackelito](#):
>
> so it will take the sum and divide on hours or something like that?

Yes

> [@](#):
>
> are you sure that’s the issue?.. looking at the scale its 0,0,0,1,1,1… feels like a config problem

You could argue that it’s a bit silly to round the values (0.2, 0.4, 0.6, 0.8) to the nearest integer, but I wouldn’t necessarily call it a bug.

---

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 25, 2023, 10:05am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/6 "2023-01-25T10:05:01Z")

</div>

hmm… not sure I follow…  
In this diagram there should be only 2 different values right?.. 0 and 1…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2023, 10:05am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/7 "2023-01-25T10:05:07Z")

</div>

> [@Mackelito](#):
>
> Also it still shows per hour… so I don’t think this is a sum problem…

My guess is that it’s using multiple data files/buckets: one for the last 24 hours, with a fine resolution and one for 7 days (or perhaps more) with a coarse resolution.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2023, 10:07am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/8 "2023-01-25T10:07:52Z")

</div>

> [@Mackelito](#):
>
> In this diagram there should be only 2 different values right?.. 0 and 1…

At some point it will average the values for a range of hours, say 12:  
(1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0) / 12 = 0.58

It will only store that value for that 12-hour period.

---

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 25, 2023, 10:33am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/9 "2023-01-25T10:33:23Z")

</div>

hmm… but the value I see in the peaks are still just 1… (Switching between 24h and 7 days)  
Here’s a video to show…  
 ![Kapture 2023-01-25 at 11.31.41](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c73460bdcd5c69296de504f2246dc08c2cce4a91.gif)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2023, 10:34am UTC](https://community.homey.app/t/bug-in-insights-diagram/75560/10 "2023-01-25T10:34:56Z")

</div>

It could of course be that the values being shown in the 7-day graph are also rounded to the nearest integer (and _then_ shown with a single decimal after the separator).
