home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.87k stars 28.97k forks source link

History data broken after 2024.7 #121296

Closed GGSSDD closed 10 hours ago

GGSSDD commented 5 days ago

The problem

History is showing the same value for entities since I updated to 2024.7. The current value is displayed properly but it seems to be ignored by the history so the graphs display a straight line with the same value the entity had at the moment of the update. IMG_1508

What version of Home Assistant Core has the issue?

2024.7

What was the last working version of Home Assistant Core?

2024.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

abroeders commented 5 days ago

I have the same problem after the update to 2024.7 The graphs show: no statistics image

The energy dashboard stopped working also. When I enter configuration of the energy dashboard: image

Developer tool - statistics shows: image

My version is: image

Logfile has some errors for the recorder component:

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:137
integration: Recorder (documentation, issues)
First occurred: 14:04:35 (8 occurrences)
Last logged: 14:35:10

Error executing query
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 137, in session_scope
    yield session
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 477, in compile_missing_statistics
    modified_statistic_ids = _compile_statistics(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 559, in _compile_statistics
    compiled: PlatformCompiledStatistics = platform_compile_statistics(
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 400, in compile_statistics
    sensor_states = _get_sensor_states(hass)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 92, in _get_sensor_states
    and (not entity_filter or entity_filter(state.entity_id))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/support/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

and:

Logger: homeassistant.core
Source: core.py:1559
First occurred: 14:04:03 (47316 occurrences)
Last logged: 14:38:41

Error running job: <Job listen * HassJobType.Callback <function Recorder.async_initialize.<locals>._event_listener at 0x7fcc30e11c60>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1559, in async_fire_internal
    self._hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 330, in _event_listener
    if entity_filter(entity_id):
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/support/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

and:

Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:911
integration: Recorder (documentation, issues)
First occurred: 14:04:35 (8 occurrences)
Last logged: 14:35:10

Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 5, 12, 10, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 5, 12, 15, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 5, 12, 20, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 5, 12, 25, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 5, 12, 30, tzinfo=datetime.timezone.utc), fire_events=True)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 911, in _guarded_process_one_task_or_event_or_recover
    self._process_one_task_or_event_or_recover(task)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 931, in _process_one_task_or_event_or_recover
    task.run(self)
  File "/usr/src/homeassistant/homeassistant/components/recorder/tasks.py", line 178, in run
    if statistics.compile_missing_statistics(instance):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 644, in wrapper
    return job(instance, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 477, in compile_missing_statistics
    modified_statistic_ids = _compile_statistics(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 559, in _compile_statistics
    compiled: PlatformCompiledStatistics = platform_compile_statistics(
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 400, in compile_statistics
    sensor_states = _get_sensor_states(hass)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 92, in _get_sensor_states
    and (not entity_filter or entity_filter(state.entity_id))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/support/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

and:

Logger: homeassistant.core
Source: core.py:1559
First occurred: 14:04:03 (47316 occurrences)
Last logged: 14:38:41

Error running job: <Job listen * HassJobType.Callback <function Recorder.async_initialize.<locals>._event_listener at 0x7fcc30e11c60>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1559, in async_fire_internal
    self._hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 330, in _event_listener
    if entity_filter(entity_id):
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/support/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

If there's something that I can do to provide more information, let me know!

Snuffy2 commented 5 days ago

https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428

GGSSDD commented 5 days ago

https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428

Thanks, I'll keep an eye on the subject.

abroeders commented 5 days ago

Thanks, disabling icloud3 plugin and restarting ha solved the issue for now. Now waiting for a update from icloud3.

cvwillegen commented 4 days ago

https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428

I looked there, but I'm not using any of those plug-ins mentioned. It looks like the recorder stops at 04:05. I'll disable auto-purge for now...

jcaraban commented 3 days ago

Similar issue here in 2024.7, but only seems to affect the conductivity history of my plants, and not moist/temp/light All graphs for the historical conductivity won't load anymore... maybe the data type is different for those entities

image

home-assistant[bot] commented 2 days ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (recorder) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `recorder` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign recorder` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


recorder documentation recorder source (message by IssueLinks)

bdraco commented 2 days ago

@abroeders 's issue is https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428

There is not enough information to tell what the OP's issue is, but it may be https://github.com/home-assistant/core/issues/117263 or the same as above

bdraco commented 10 hours ago

https://github.com/home-assistant/core/issues/117263 is fixed in 2024.7.2

icloud3 versions that break the recorder are also blocked in 2024.7.2