ha-average icon indicating copy to clipboard operation
ha-average copied to clipboard

Home Assistant becomes unresponsive when using average sensor

Open Simsala91 opened this issue 1 year ago • 0 comments

Checklist

  • [X] I have filled out the template to the best of my ability.
  • [X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • [X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I've used the average sensor to determine the average of a few entities for a long period of time (a month). These entities update very regularly (~every 5 seconds) and after I configured the average sensors, Home Assistant has become very unresponsive. It seems like every time the entities update, the average sensor gets recalculated, pulling in data for ~100.000 changes per entity. Every time it does this, there is severe input lag in Home assistant. Even Zigbee devices have been reacting very poorly and were reacting fine after I disabled the sensors again.

Describe the solution you'd like

Make the calculation of the average sensors in a seperate, low priority thread if it isn't doing that already?

Add an option to change the update frequency for certain average sensors? I don't need the average sensor for data of a month to update every 5 seconds.

Describe alternatives you've considered

Implement this in my own way?

Additional context

Home assistant becoming almost unuseable while average sensor is active

Simsala91 avatar Feb 13 '24 09:02 Simsala91