Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lovelace sensor graph accuracy #2038

Closed
ghost opened this issue Nov 11, 2018 · 6 comments
Closed

Lovelace sensor graph accuracy #2038

ghost opened this issue Nov 11, 2018 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 11, 2018

@SteveEdson commented on Nov 10, 2018, 11:25 PM UTC:

Home Assistant release with the issue:
0.82 (and previous versions)

Last working Home Assistant release (if known):
N/A

Operating environment (Hass.io/Docker/Windows/etc.):
Docker

Component/platform:
Lovelace Sensor card

Description of problem:
The graph in lovelace shows one thing, but clicking on the entity shows a very different graph. I'm not sure how accurate the data is in the lovelace card, as it looks very different to what I would expect.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- type: sensor
  name: Heating
  id: house_temperature
  entity: sensor.house_temperature

Expected, from normal graphs:
screenshot 2018-11-10 23 22 43

Lovelace card:
screenshot 2018-11-10 23 22 48

As you can see, they are very different.

This issue was moved by cgarwood from home-assistant/home-assistant#18366.

@Ernst79
Copy link
Contributor

Ernst79 commented Nov 13, 2018

Having the same issue. I thought it was by design. Increasing the accuracy doesn’t help much unfortunately.

@Petro31
Copy link
Contributor

Petro31 commented Nov 17, 2018

So i'd like to comment here, the default accuracy is 10. This graph does not average points, it purely pulls data points. So if your history over 24 hours has 40000 data points and the accuracy is 10, the graph will show every 4000th data point. If you want an accurate representation, you may need to bump the accuracy up ten fold if your sensor collects a ton of data.

@SteveEdson
Copy link

Does it show every 4000th data point, or take the average of the data points in groups of 4000?

@Petro31
Copy link
Contributor

Petro31 commented Nov 17, 2018

Simply just shows the 4000th data point. No averaging. It also plots the array with equal x spacing. I.E if you have large time gaps in your data, they won't be represented properly.

@SteveEdson
Copy link

Ok, surely it'd make sense if these data points were averaged out then? Or at least have the option to do this?

@Petro31
Copy link
Contributor

Petro31 commented Nov 17, 2018

It's doable. I just made an update to the card and purposely avoided that because the data points from history are not guaranteed to be uniformly spaced. So a moving average would also doctor the graph just as much as leaving it be.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants