-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: localtuya is flooding the DB of events #517
Comments
The is an old issue #372 tho I haven't give it much attention yet so yes I would recommended to exclude it from recorder for now, this could happen if you have a sensors that update every seconds. |
For every new version I make the same modification:
If not "event" and "event_data" table of database grow by several gigabytes every day. This recording of events by "self._handle_event(self._status, status)" should definitively be an option disabled by default. |
this method handle the whole device not only one entity, Now the issue even If I give the user the option to turn it on it's still an issue it's still an issue and If HA doesn't give an option to filter it hard coded, then I'll need to create filter my self it's fine it's not big deal I'll look into it soon. |
Yes but I don't know the reason of these writes in "event" tables of database for every entities. In fact I don't know the use of "event" tables. For me it's completely useless. The only data I use come from the "state" and "statistics" tables of database. If I truncate these "event" tables nothing change, home assistant still running flawlessly without any difference. I imagine "event" tables have some use but I didn't see it. It's possible to choose what is recorded in "state" tables from recorder settings but these settings have no effect on event tables. So I only see "event" tables as a major flaw that cause my home assistant eat my memory and became unfunctionnal in just few weeks. |
LocalTuya Version
2025.1.1
Home Assistant Version
2025.1.4 Docker
Environment
What happened?
Hello there,
I just reported on the HA community how LocalTuya is flooding the DB of events.
https://community.home-assistant.io/t/how-to-keep-your-recorder-database-size-under-control/295795/303?u=m4r1k
The events are described here: https://github.com/xZetsubou/hass-localtuya/blob/master/documentation/docs/ha_events.md?plain=1
But I think there should be a config on a per-device basis to record all this many events.
Also, I've seen an increase in the number of events from the 2025.1 version.
Steps to reproduce.
unclear
Relevant log output
Diagnostics information.
No response
The text was updated successfully, but these errors were encountered: