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

history-graph is shown for an entity excluded from Recorder #20008

Closed
4 tasks done
ildar170975 opened this issue Mar 7, 2024 · 7 comments
Closed
4 tasks done

history-graph is shown for an entity excluded from Recorder #20008

ildar170975 opened this issue Mar 7, 2024 · 7 comments

Comments

@ildar170975
Copy link
Contributor

ildar170975 commented Mar 7, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

2024.3 changed history-graph:
it started showing graphs for entities which were excluded from Recorder:

type: history-graph
entities:
  - entity: sensor.service_zero_value

image

The shown history could be absolutely wrong since this entity is not recorded.
Then there is no sense to show this history.

Earlier for not-recorded entities a history was shown only in case of NEW changes made while displaying the history.
Showing a past history based on a last value spanning a whole period is meaningless.

Describe the behavior you expected

Do not show past history for not-recorded entity.
Show only new changes if a user intentionally added this entity to history-graph or looks at a history in more-info.

Steps to reproduce the issue

as above

What version of Home Assistant Core has the issue?

2024.3

What was the last working version of Home Assistant Core?

2024.2.5

In which browser are you experiencing the issue with?

Chrome 122.0.6261.95

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@Petro31
Copy link
Contributor

Petro31 commented Mar 7, 2024

HA has done this for a long time now in the more info page with excluded entities. I'm not surprised it does the same thing in history-graph.

@ildar170975
Copy link
Contributor Author

ildar170975 commented Mar 7, 2024

I'm not surprised it does the same thing in history-graph.

Read my post again. In more info excluded entities did not have a history. It only started displayng when you have more-info open and a changing state in parallel.

Guess this new behaviour related to #19176.

@Petro31
Copy link
Contributor

Petro31 commented Mar 7, 2024

Read my post again.

I don't have to, I understand what you're saying. I'm pointing out that I would expect this to happen. No need to get testy.

@ildar170975
Copy link
Contributor Author

ildar170975 commented Mar 7, 2024

But these words are not correct:

HA has done this for a long time now in the more info page with excluded entities.

Here is from 2024.2.5:
image
The entity is excluded. No history as expected.

2024.3:
image
And this is wrong because there is no info about what states were in the past.

@WarC0zes
Copy link

WarC0zes commented Mar 8, 2024

Hi,
I noticed the same behavior. I excluded entities from the recorder and before I didn't see anything in history. Since core 2024.3.0, I see entity history that is excluded.

example in my recorder.yaml :

  purge_keep_days: 3
  exclude:
    entity_globs:
      - sensor.*_linkquality

image
image

@ildar170975
Copy link
Contributor Author

ildar170975 commented Mar 8, 2024

Some more from 2024.3:

input_number.test_number is excluded from Recorder.
Here a history from 01.03.
HA 2024.3 was installed 07.03.24.
The entity was changing almost every day since 01.03 - surely these changes were not recorded, but the graph wrongly shows us a constant value:
image

Let's add one more entity - let it be some input_boolean (also excluded from Recorder).
And we got a new look:
image

Adding a "ha_uptime" graph shows that this "starting of history" is some HA startup on 08.03 (even not the 1st run with 2024.3).

image

I say this is inconsistent & wrong.

@ildar170975
Copy link
Contributor Author

ildar170975 commented Apr 17, 2024

2024.4.3:
If entity is excluded from Recorder - it is shown in History starting from the last HA reboot:

image

More-info shows only this "false recorded part":

image

Both graphs SEEM to not reflect that this entity could have changes within this period.
But may be there were NO CHANGES within this period actually?
So, let's change this entity.
Then reopen more-info:

image

The starting point on the graph - time of the last change.
It does not show the previous changes - as expected since the entity is excluded from Recorder.
So this graph seems to be CORRECT.

Reopen the History page described above:

image

The graph also seems to be CORRECT - it reflects the LAST known change.
If shown w/o other entities - also shown CORRECT:

image


Test with input_boolean excluded from Recorder:
History - similar, starts from HA reboot:

image

More-info - similarly (starts from HA reboot):

image

Change the value, reopen more-info - it starts from the change's time (CORRECT):

image

And History - also starts with a change's time (CORRECT):

image

Finally, the current implementation seems to be CORRECT.
May be there were some changes which improved the implementation.
Or may be I made a mistake earlier...

Closing the issue.
Please let me know if I should reopen it.

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

3 participants