Entity not available - how to rid this

I’ve been building up a (still relatively modest) HA setup on a RPi 4 over about three years and we’re delighted with it; at last a system which caters for the rapidly changing sunrise and sunset times for several months around March and September.

I’ve had a play with various bits and bobs (DIY built light sensors) and suffered a failed Broadlink WiFi socket (still yet to be replaced) but (apart from the ones that have been successful and kept) these all lead to one thing (and now I have three or four of them): “Entity not available”.

My OCD is really being taxed to the limit since (without poking around in the innards of HA and possibly breaking something) I cannot find a way to simply remove them and leave no trace. I realise this is a well-worn topic but I’m struggling to understand why over several years it either hasn’t been addressed, or the implementation of a method to remove them hasn’t been widely advertised!

Short of totally re-installing my system (which might help me with a long-standing Life360 issue as well), or taking a long look in one of the recent full backups, deleting stuff that looks relevant and then installing that and hoping it still works but without the unavailable entities, is there a “proper” method?

Many thanks, Mark B

If you are keen to see a solution to this built in (I know I am) then this:

and this:

might be worth voting…

Surely it’s time this perennial issue was fixed. It doesn’t strike me as too much to ask.

I’m up for a referendum…

Are you talking about entities created by deleted integrations?

Spook has a bulk delete orphaned entities option. If you’re talking about missing entities in dashboards, it will also detect those.

Alternatively, Watchman will detect entities used in your configuration which no longer exist.