States_attributes table flooded with unwanted and also very personal entries that I don't need/want collected

My states_attributes table has almost 25,000 rows, most of which are generated by the following sensors/services:

  • 14,400 Pixel phone entries that seem to be literally tracking my every move with latitude/longitude I believe my phone is only connected because I installed the Home Assistant app on it and I don’t remember agreeing to be tracked

  • 7000 Alexa-related entries-- including songs played, next reminders, next alarms, and lots of other either very personal or totally useless information from all the Alexa devices in my house, but I only use the Alexa integration for it’s tts features

  • 1599 Backup State entries – do I really need 100’s of these a day?

  • 727 weather forecast entries - I guess this is OK, assuming they actually expire sometime

If this all rolls off and expires when the corresponding states expire, then I guess I am OK other than the very personal tracking data collected from my phone and alexa devices.

Is there any way to:

  1. Not collect the personal data
  2. Minimize the unneeded clutter of the other day

It’s been quite a while since I set mine up but I’m pretty sure you have to enable Location via Android’s settings, give Location permission to the app via Android, and enable the Companion app’s Location Sensors.

You can any of the following:

  1. Turn off Location tracking in Android.
  2. Disable location permissions for the companion app.
  3. Disable specific sensors in the Companion app settings.

For other integrations you can disable entities from the Entities Settings menu, but AFAIK there isn’t a way to disable specific attributes.

The Recorder purges data more than 10 days old, you can change that value if you want everything purged more often, or you can set up an automation to purge specific entities’ data more often by using the recorder.purge_entities service. Again, AFAIK there isn’t a way to just purge attributes.

Very helpful.
I get that if I shut off Location permission then almost by definition HA won’t have access to phone location information.

I would have hoped though that turning location capture on/off would be an option in the app rather than having to go back to an Android OS security feature.

For example, you may want to regularly toggle on/off location depending on the privacy of where you are visiting. It would make more sense to do this in the app than having to go to Android security permissions each tie.

It is an option. On the device go to Settings > Companion App > Manage Sensors and disable the sensors you don’t want running. FWIW, depending on how many of the sensors you have running, shutting off permission may be both quicker and more secure than manually toggling all the sensors that may betray your location.

I’ve never tried it for this specific use, but the Spook custom integration has services to enable and disable entities on the fly. You should be able to set up a widget on your phone that calls a service to toggle the targeted sensors on and off. Unlike disabling Android Location permissions, with this method control isn’t limited to the phone. Anyone in your household savvy enough to search the DB could re-enable the entities pretty easily… they could even set up an automation to do it.

Realistically, if a location needs to remain private you should leave your phone somewhere else or, at a minimum, turn it off completely.

Oh cool… I didn’t realize that such settings existed.
So many (potential) sensors to track :slight_smile:
Now all makes perfect sense!!!