Recorder exclusions apply to the database?

My database is out of control so I deleted it to start fresh.

If my config yaml has
Recorder:
Exclude:
Domains:
- sun

Shouldn’t that keep the sun from logging states?

Doing a Select * from “states” where domain = ‘sun’ still nets me 100+ entries just from today.

I have recorder with some wide exclusions , and then include domains of switch and sensor.

Not sure why the database is still recording state changes from the sun.sun entity.

You restarted HA right? Depending what your keep days or your purge time is, things may stick around for a little bit. Check the database 24 hours after you restart to see what’s in the database.

Hmm, yeah a day later it’s cooperating. I ended up going nuclear on it and using includes instead of excludes. A bit more setup one time, and then have to add new sensors manually, but its already cut my daily database growth down 90%. Those damn TPLINK/KASA integrations! The smart plus with energy monitoring send data several times a minute even if nothing has changed.

I wish the energy monitoring was broken it’s it’s own sensor and not an attribute of the main switch entity.