Cannot Remove Old LIFX Bulbs from Home Assistant

I recently removed some LIFX bulbs from my smart home. I deleted them in the LIFX app but they remain in Home Assistant and I’m not sure how to remove them. HA shows 8 devices while the LIFX app correctly shows 5.

You can delete the entities from the device but there is no way to delete a device from an integration using the UI without deleting the whole integration.

You have to edit the core registry files in.storage and hope you don’t stuff up the whole install (make a backup of the .storage directory before editing anything).

This would seem to be a simple thing to implement but it has been annoying people for quite some time:

Oh wow, that’s surprising! I figured that as new lights were easily brought in when added to the LIFX app, the reverse would be true. Oh well, let’s look forward to a future update on that and I’ll try removing them from the core registry files in the meantime. I’m running HA as a VM, so I’ll take a snapshot first.

Thanks for your help.

FYI- I posted a solution/workaround for this in another forum as I too had 30 bulbs I needed to remove…

Solution is pretty easy (took longer to document then it did to purge the 30 bulbs)…

Device cleanup has finally been implemented for LIFX in PR #65964 and should be in Home Assistant 2022.3.0.

This has sparked some discussion and we might yet get a generic solution :crossed_fingers:

1 Like

Unfortunately the solution implemented didn’t work for me when I needed to replace 2 LIFX bulbs today.

I will later file a bug once Ii decide if what I did SHOULD be broken or not…

I tried going about fixing this the way I did (and posted here earlier).

Step one I renamed the entity bulbs that were NO LONGER present (and replaced by newer bulbs)… Since these bulbs were added to Lifx BEFORE I removed them from HA (and of course created these with the same name since they were replacements for defective bulbs)… they came in with GENERATED device names (and related entities)

I finished all the HomeKit/Lifx/Alex set up needed

Step 2 I RENAMED the 2 OLD bulbs (again per my procedure detailed above), prefixing the devices with “bogus-”, and CONFIRMING that I wanted the related entities renames (two make space in the name space for the replacement bulbs and allowing all config to absorb the new bulbs)… then I would decide how best to deal with the 2 bogus bulbs and associated entities (hopefully deleting the entity and seeing of the change implemented would delete the associated now orphan device)…

UNFORTUNATELY the entities were never renamed by HA when I renamed the device and are tased as non unique so I can’t delete the 2 entities I WANT to delete (two free up the name space), I even tried renaming those bulbs a SECOND time but since they are listed as reloaded and non-unique not much I can do in the UI.

I’ll try a couple other things for the sake of others before I AGAIN resort to having to edit the database…

IF you want assistance in debuting the issue (either the Feb Lifx delete feature or issue I am dealing with) please let me know in the next day as I will tomorrow just resort to the editing the database as I need to move on from this with other matters.

Thanks again all for what you do, just trying to do my part here to help…

Apologies for the duplicate post but wanted to clear the good names of those who worked on the orphan device clean up. I posted this on the other thread as well…



Update… Good news. I restarted my HA instance and the cached entity names seem to have been purged so I was finally able to delete the old/bogus named entities. This in turn created orphan devices which the new code I referenced above automatically removed (as designed)… Should have thought to try restarting before taking the time to post… Hopefully this now means no one else has to hand edit their database (unless you are into that kinda thing)… lol

1 Like