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.