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

Weird lower/upper bounds MAY BE shown for a not-recorded entity #1135

Open
ildar170975 opened this issue Sep 4, 2024 · 2 comments
Open

Weird lower/upper bounds MAY BE shown for a not-recorded entity #1135

ildar170975 opened this issue Sep 4, 2024 · 2 comments

Comments

@ildar170975
Copy link
Collaborator

ildar170975 commented Sep 4, 2024

Some sensors are EXCLUDED from Recorder:

recorder:
  ...
  exclude:
    ...
    entities:
      ...
      - sensor.xiaomi_cg_1
      - sensor.xiaomi_cg_2 

Consider this card for the 1st sensor:

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1
    attribute: co2
show:
  labels: true

image

Note that:

  1. A flat line is shown.
  2. Lower & upper bounds are same & equal to some weird "559" value:
    image

And same card for the 2nd entity:
image

Note that:

  1. No graph is shown (as expected).
  2. Lower & upper bounds = 0 (as expected).

About 2 weeks ago (23.08.24) while checking this issue the 1st sensor was INCLUDED in Recorder for a few hours.
This is the last record in DB for this sensor:
image
where last_updated_ts is 1724421565.94111 (Friday, 23 August 2024 16:59:25.941 GMT+03:00).

And attributes_id of this last record is
image
with that "559" value.

Means - this old "559" value recorded 2 weeks ago is shown in a graph - although hours_to_show: 24 (a default value).
There will be same glitch if hours_to_show is defined explicitly:
image

Imho we should not use a value from a DB if this value is beyond a selected time interval.
Probably, there may be some negative side effects after this will be fixed, not sure...

P.S. Browser's cache was cleared.
v0.12.2-dev.2
2024.9, Chrome

@FAB1150
Copy link

FAB1150 commented Sep 9, 2024

maybe the best workaround for now is using the "sampler" integration on sensors that update very slowly. I do that with many sensors not just for graphs (especially for reinmann sum sensors, before the update that basically does the same thing as sampler).

@ildar170975
Copy link
Collaborator Author

Thanks about info, I will read about “sampler”.
But here no workaround needed - this a harmless glitch: since I know that this entity is excluded from Recorder - I will not want to see it’s graph in mini-graph-card.
The main point is that old record is not supposed to be used since it is beyond a time interval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants