No History Graphs or Logbook Entries after Upgrade

On July 3, I upgraded to 2024.7.0. Since then, I’ve had no history graphs available and very limited logbook entries. Even automations that have triggered properly do not show up in the logbook.

Only two entities (Home Assistant (started/stopped) and my iPhone location) are in the logbook.

I’ve only been using HASS for a couple of weeks. Before this, everything seemed to work normally.

I have cleared my cache.

If there’s any code I can post to help troubleshooting, please let me know.

Here’s an excerpt of my log that may mean something to someone here.

Log details (ERROR)
Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:911
integration: Recorder (documentation, issues)
First occurred: 7:10:14 AM (83 occurrences)
Last logged: 2:00:10 PM

Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 4, 16, 35, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 4, 16, 40, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 4, 16, 45, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 4, 16, 50, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 4, 16, 55, 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

Do you use any of these?

icloud3
places
hass-variables

If so, you have a third party integration that is messing with the Recorder database filtering in an way that it should not. See: 2024.7: Time to resize your cards! - #84 by Snuffy2

As this has generated an architecture discussion about providing a way to filter the recorder safely it may not be a quick fix. Your current options are:

  1. Downgrade to the last HA core version (2024.6.4) and wait for a fix, or

  2. Stay on 2024.7 but stop using the offending 3rd party integration(s).

2 Likes

Thank you Tom.

I do use iCloud3. That may have been part of the issue. I also had some other issues that I wasn’t happy with so I restored a backup from prior to the update.

I then reapplied the update and it seems to be working perfectly, including history and graphs even with iCloud3 running.

Strange, but, long story short, it’s working fine,

I have the same issue, but are’n using any of the above integrations…
Writes to my influxdb keep on occuring.

Lock-up always happens round 4 am.

There are two separate issues. See PSA: 2024.7 recorder problems

Does this issue affect only internal (MySQL) database?
I have iCloud3 installed and do not see these problems, though I use external MariaDB, running on my Synology NAS. I do see some errors related to iCloud3 since 2024.7 update, but these are different from these discussed here…

I don’t know. Ask in that topic, one of the Devs is posting there.