I have many sensors that measure the power consumption, voltage and so on. Every state change is stored in the database in the table states and in the table events.
My events table is huge (30 GB). I do not see any reason to store events of type ‘state_changed’ twice, therefore, I deleted them in table ‘events’. But to my surprise this has no effect to Home Assistant. Even the history still works.
Why are events of type ‘state_changes’ stored in table ‘events’?
How can I prevent ‘state_changes’ to be stored in the table ‘events’ in the first place? (They should be stored only in table ‘states’. I could run a script that deletes these events from table events (e.g. every day), but this is not a good solution.)