The problem still occurs, I noticed this error, it occurs every 8 hours.
‘2023-02-26 15:00:10.588 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: float division by zero
2023-02-26 15:00:10.589 ERROR (Recorder) [homeassistant.components.recorder.core] Error while processing event StatisticsTask(start=datetime.datetime(2023, 2, 26, 13, 55, tzinfo=datetime.timezone.utc), fire_events=True): float division by zero
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/recorder/core.py”, line 671, in _run_event_loop
self._process_one_task_or_recover(task)
File “/usr/src/homeassistant/homeassistant/components/recorder/core.py”, line 684, in _process_one_task_or_recover
return task.run(self)
File “/usr/src/homeassistant/homeassistant/components/recorder/tasks.py”, line 143, in run
if statistics.compile_statistics(instance, self.start, self.fire_events):
File “/usr/src/homeassistant/homeassistant/components/recorder/util.py”, line 600, in wrapper
return job(instance, *args, **kwargs)
File “/usr/src/homeassistant/homeassistant/components/recorder/statistics.py”, line 701, in compile_statistics
compiled: PlatformCompiledStatistics = platform.compile_statistics(
File “/usr/src/homeassistant/homeassistant/components/sensor/recorder.py”, line 382, in compile_statistics
compiled = _compile_statistics(hass, session, start, end)
File “/usr/src/homeassistant/homeassistant/components/sensor/recorder.py”, line 522, in _compile_statistics
stat[“mean”] = _time_weighted_average(fstates, start, end)
File “/usr/src/homeassistant/homeassistant/components/sensor/recorder.py”, line 127, in _time_weighted_average
return accumulated / (end - start).total_seconds()
ZeroDivisionError: float division by zero’