elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
133 stars 24 forks source link

Unnecessary logging of the last activity attribute #104

Closed freddieleeman closed 5 months ago

freddieleeman commented 1 year ago

My backup took forever to complete, and when I checked, I was shocked to see that my HA database file had bloated to a whopping 20GB. The culprit was none other than the EdgeOS device tracker hogging up space in the state_attributes table. This plugin keeps updating the "Last Activity" attribute of every single device every second!

ubnt

mabahj commented 7 months ago

I think I just noticed the same. I ran an SQL query to check my database (from here: https://community.home-assistant.io/t/how-to-keep-your-recorder-database-size-under-control/295795/125 ) and the one device I'm tracking consumed 23% of all the "states" entries in the entire database. Next in line was sensor.ubnt_last_restart, which consumed 9%.

(For the record: Love the plugin, it is a really nice feature you've provided, elad-bar! Thank you, very much appreciated!)