Hue discovered Light(s) don't go away after exclude hue

Initially my HASS has discovered all my emulated hue devices (HA-bridge) very well.

After I had imported my Vera devices and want to get rid of HA-bridge doing the hue emulation and let HASS do the emulation for me, I wanted to ged rid of the discovered devices from HA-bridge (hue devices) showing up as lights in the HASS overview. I have not done anything special with that list until now.

I added to the configuration.yaml file:
# Discover some devices automatically
discovery:
ignore:
- philips_hue

But after multiple reboots, restarts, refresh and a while nothing happens… The hue “lights” still remain visible in the HASS overview.

What is the best way to get rid of them in a good way?

You probably need to remove them from the entity_registry, take a look at this thread

1 Like

Thank you for your reply. To be absolutely clear. These are not zwave devices but philips hue discovered devices (advertised via ha-bridge on my local network which is a hue emulator).

It’s the same for everything and the linked comment in the post has nothing to do with the overall post. The take away is how you remove items from the hidden core files. You’ve already handled the hue side by ignoring it. So hue will no longer automatically create the entities. Now you need to delete the auto-created entities from the hidden core files. Follow that post to properly remove items from the core files.

EDIT: And just to clarify, there is no way to do this from the UI. This is a “hot topic” with many people, just see all the comments in the linked post. The only way to remove unwanted items is to edit text files.

Thanks again, I have the " Configurator Browser-based configuration file editor for Home Assistant" installed. How exactly do I nee dto remove discovered devices that I do not longer want?

This is not very user friendly… sorry to say

Found it. edited the file and removed all entries with “hue” in it.

But they still appear after a reboot.

I have:
# Discover some devices automatically
# discovery:
# ignore:
# - philips_hue

and edited the file:
/config/.storage/core.entity_registry

Ok. This is it. I deleted another bunch of HUE devices and now I get:

Unable to connect to Home Assistant. RETRY.

I think I broke it for good now.

I am at the point of giving up on hass. The way to do everything from the CLI via config files is not very friendly to me.

edit: I still can see the file via http://ip:3218/

panic but no panic…
there’s probably an incorrect listing in the json right now. biggest chance is for an orphan ‘,’ left over when deleting an entry. Carefully examine the text file in a pure text editor (not in a wordprocessor).

If all fails, you can always delete the whole file and it will be rebuilt afresh. (always backup before editing is what you have learned now the hard way)

thank you :slight_smile:

I have deleted the last “,” after the last deleted device.

It now starts again… though the devices keep getting recreated…

you need to edit 2 files:

17

in both files the hue entries are made. Delete the ones you don’t want any longer, or which names you have changed and are still there in the old version

The devices will keep getting created because you commented out discovery:

uncomment this file these lines, I.E. remove the # sign.

# Discover some devices automatically
# discovery:
#   ignore:
#   - philips_hue

have tried it all.

this also not working:
# Discover some devices automatically
discovery:
ignore:
- philips_hue
- igd

Well your spacing is off, need 2 spaces before ignore, hue and igd.

discovery:
  ignore:
  - philips_hue
  - igd

When that is correct, you then remove the entities from the core.registry. Do not uncomment the discovery block because it will always discover the entities and add them back.

Also, I understand your frustrations about this process. This is one of the few processes that is still convoluted today. So to start from the begining you need to do the folllowing:

  1. Ignore the component in the discovery section that is creating the entities. (Keep this in your configuration forever).
  2. Turn off home assistant.
  3. Remove undesired entities from the entity registry. I.E. the core files.
  4. Delete homeassistant.db, this will remove the items from history.
  5. Restart the home assistant.

If you follow those steps, the undesired entities should never appear again.

This process will change in time when developers add a way to remove entities from the entity registry. Home assistant isn’t there yet but it will be.

Spacing layout is reformed by the forum. attached is my current spacing…hassio

Ok, so keep that in your configuration and never remove it and follow the steps I listed in a previous post.

EDIT: FYI homeassistant.db might not be the correct name, either way its the database file inside your config folder. Just delete that. You’ll lose all your history but it will remove entities that it was tracking.

delete homeassistant_v2.db???

Yes. HA will create a new one. But again, this will remove your current history for devices.

Did it exactly. I stopped hass via the gui and after reboot nothing happened. I started via console with homeassistant start and voila! < all is back >.

It did not do anything. I did exactly what you said.

I now have:
home-assistant_v2.db
home-assistant_v2.db-shm
home-assistant_v2.db-wal

Sorry to say, but I give up. I really hoped hass was more mature than other HA systems. The potential is really there. but this hassling round with configfiles, entities, files, reload etc. is not my cup of tea. This is just trying to get your system controling your home up with troubleshotting. And this is just setting up… what about if I have it setup and have this little problem? Where do I end up then?

I really admire the effort this community puts in the platform and I can see there is a huge potential in this way of setup. But the lack of wysiwyg is holding back this potential.

edit: HASSling around :slight_smile: that’s what HASS stands for?

What’s this in /config/.storage/core.config_entries

    {
        "connection_class": "local_poll",
        "data": {
            "bridge_id": "021132FFFE25F0D5",
            "host": "192.168.1.123",
            "username": "f918d87c0e6646b48db4ae68bf01df5b"
        },
        "domain": "hue",
        "entry_id": "c25c6db93d8a4f6ebbe115fec99d62cd",
        "source": "discovery",
        "title": "HA-Bridge",
        "version": 1
    },

If that’s the case then I don’t think your entities are coming from philips hue. If you’ve done everything I said, the only option is that they are coming from another component. Or the component is hardcoded in another spot in your configuration. Did you remove the hue configuration as well?

As for quitting, I’d check this out in a few months. I’d wager that the removal of unwanted entities will be corrected by then. For what it’s worth, most people don’t run into this because they aren’t transitioning between platforms left and right.