hg1337 / homeassistant-dwd

Custom component for Home Assistant that integrates weather data (measurements and forecasts) of Deutscher Wetterdienst (DWD).
Apache License 2.0
84 stars 6 forks source link

HA-core 2023.3.0.b5 warning recorder - exceed max. size of attributes #6

Closed S-Przybylski closed 1 year ago

S-Przybylski commented 1 year ago

Hi, there is a warning visbile since updated to the HA march 2023 beta:

HA-Version: Home Assistant 2023.3.0b5

Log:

Logger: homeassistant.components.recorder.db_schema
Source: components/recorder/db_schema.py:491
Integration: Recorder (documentation, issues)
First occurred: 08:32:25 (1 occurrences)
Last logged: 08:32:25

State attributes for weather.norvenich_flugplatz_hourly exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
hg1337 commented 1 year ago

@S-Przybylski thank you for bringing this to my attention. I will look into this.

S-Przybylski commented 1 year ago

(Das ist doch selbstverständlich)

hg1337 commented 1 year ago

I had a look and I‘m going to add a configuration option to limit the number of forecasts so people can decide whether they want to have more forecasts or rather have the history.

I need some more days to finish this. Until then, everything should work fine except the history. If you anyway don’t need the weather data in the history, you may exclude the entities in the configuration of the recorder integration, then the warnings should go away, too.

S-Przybylski commented 1 year ago

I can live with the fact, that the data is not stored in the history, especially if we talk about predicted values.... I am not sure, if a code update needs to be done.

hg1337 commented 1 year ago

Originally, I was going to add a configuration option to limit the number of forecasts. However, I haven't seen the warning in a while and with the new mechanism to provide forecasts via async methods instead of properties this should at least for the new combined entity not happen any more.