my events table is growing fast. i know that events are used to respond with automation, but why do i need to save them in a table? is it safe to truncate it every once in a while?
1 Like
I run these commands every 3 hours to reduce database entries by 90% (number not size) with no ill effect to HA that I can see.
mysql -uhass -phass HOMEBASE --execute="DELETE FROM events WHERE event_type = 'service_executed'";
mysql -uhass -phass HOMEBASE --execute="DELETE FROM events WHERE event_type = 'call_service'";
mysql -uhass -phass HOMEBASE --execute="DELETE FROM events WHERE event_type = 'component_loaded'";
what about state_changed? thats the biggest one