WTH Is it it so awkward to "uninstall" or "delete" a (non-built-in) integration?

Happy to be told I’m wrong but to this day I’m baffled why I cannot just delete / uninstall an integration with an explicit menu click somewhere.

To clarify, I am only talking about non-core integrations. Core integrations that come built into HA I don’t expect to ever be uninstallable.

Instead, it seems the only way is to have to delete every single device of it and then restart HA. But I’m not sure if that truly removes all the artifacts of an integration. Happy to be told I’m wrong on this but then in and of itself that shows that integration uninstallation is an odd process. It should be intuitive and obvious.

Am I totally off on this?

Thanks!

Have you noticed the 3 dots on the intergration screen behind configure. There you find the delete option.

1 Like

Yes, but that deletes ONE configuration of the integration.
Some issues with it:
(1) there could be multiple configurations. Not all integrations allow it, but some do. So you must delete all of them. In some cases, I have 8-9 configurations for some, deleting them all is at best cumbersome, at worst odd.

(2) from a purist perspective, I don’t see why deleting all configurations should remove the integration. Conceptually, my brain thinks having an installed integration without any configurations is valid and so removing all configurations doesn’t mean removing the integration.
It can also be undesrieable. I may want to remove all configurations and start with new ones. But I need to be careful in today’s regime lest I delete the entire integration. It’s just weird to me.

(3) It doesn’t always work. E.g. the wyoming wakeword integration, you can delete all configurations and it still survives and shows up as “discovered”. It’s weird. The only way I’ve found to “remove” it is to disable it.

All in all, I’d prefer something that can uninstall/delete an integration as a whole rather than individual 1 or more integrations (which can be cumbersome if you have manyu), with unclear behavior (ie why would removing the last configuration magically remove the integration when I might not even want that or conversely, it doesn’t feel like the integration will be fully cleaned up and removed).

:slight_smile:

BTW this was one of the first oddities to me when I started working with HA. I’ve gotten used to it but I occasionally bump into it and it still feels bizarre and kind of broken.

Just to be clear, that is what ncd is talking about. You have to delete all devices in the integration:

Alternate method also requires deleting all entities:

There is no option to just delete the integration and all of its entities/devices.

@ncd don’t forget to vote for your own WTH.

1 Like

Haha thanks for the reminder @tom_l !

You have to remember that no integration can ever be deleted**. Every built-in integration still always exists in the HA core even if there are no configured instances of the integration. So even if you are “deleting the configured integration” then the associated integration is still hanging out in the background. Which accounts for the discovered integration devices/services/etc.

That is supposed to be a part of the “Make It Easy” path that HA is on so that “target audience” users don’t need to do anything to configure an integration - HA pretty much just does it for them. And the only option to not have it auto configure the discovered integration device/service/etc is to purposefully ignore it.

But I would guess it wouldn’t be too hard to add a “delete all” button to delete all of the configured instances of the integration to the header somewhere.

But then the complaint will be that “I don’t want to delete all of the instances, just half of them, why don’t we have check boxes for the ones we want to delete?” Which also isn’t necessarily invalid but at what point is it not worth the effort to change something that is very rarely used? I don’t know that I’ve ever wanted to delete all or a significant multiple of any integration instances in my system.

**At least for the built-in integrations - custom integrations are similar but different in that they can actually be totally deleted by removing them from the custom components folder.

1 Like

I should have been clearer. I am specifically talking about non-core integrations. I never thought or imagined a core built-in integration would be deleteable.

I’ll edit the title if I still can.

1 Like

non-core integrations would mean custom integrations, which would mean HACS. This would ultimately lead to this WTH being closed as custom things are out of scope. Are you sure you mean “non-core” integrations?

I think he needs to clarify what “delete” means.

In my opinion, delete would mean “The removal of all config entries”. There is a for that, even with core integrations, because it’s not possible to remove all config entries at once. The integrations that have multiple config entries typically have a 1 to 1 entry per device entry. Making it look like you have to remove each device individually.

I don’t think he means delete from a file perspective, which is impossible for anything non-custom.

then my ** caveat above stands.

if you installed a custom integration…

…via HACS then there is a button in HACS to remove/uninstall the custom integration from the system.

…manually by copying the custom integration to the custom components folder then you would need to remove it manually just like you installed it manually.

with either of those methods you would need to also remove any configured instances of the integration first. I’ve never tried deleting a custom integration with any instances configured via the UI so I don’t know how the system would react but I’m sure it wouldn’t be happy but at a minimum you’d get a nasty entry in the log and probably a red box in the integration UI.

Tho I have had times when a custom integration was configured via yaml and the integration was faulty so the system rejected it and threw an error in the logs about it (platform ‘x’ not found…).

as far as being required to restart HA to completely remove an integration not all integrations require that. Some do. But it’s not really any different than uninstalling some windows computer apps. Some can be completely removed without restarting and some can’t. it depends on how the system incorporates the app into itself.

you also said above that removing all config entries for an integration will “magically remove the integration”. That isn’t true. You will always have to take the extra step to remove the integration after all configured instances are removed or it will still be hanging around in your system.

TBH, I’m still not sure exactly what you are having an issue with.

Here is an example.

Originally my HA installation didn’t have this openWakeWord (Wyoming Protocol) integration. Many months ago I followed some official doc on how to add it to my installation and did so to play with assist.

I now want to remove that integration and I’ve found no way to do that. Is it a core integration? It’s not HACS.

What I’ve done so far is I’ve removed all its configurations but it’s now constantly popping up as “Discovered”.

So appears, I have the option of forever having a notification which I need to learn to visually ignore OR click the “Ignore” button to make the integration “disappear” (not really, of course).

So basically something has happened where I cannot revert my system to a state as it was before installing the integration.

I’d like to have an intuitive flow to “uninstall” the integration. Pls assume I’m not a developer or make me do complicated HA DB / HA OS surgery.

Happy to be told I’m being an idiot and why but I don’t get it.

image

Ignore it (click ignore button). It’s going to constantly get discovered if it’s on your network. The only way to make that not appear is to remove the device from your network or remove HA discovery.

In regards to that particular discovery pop up, that’s caused by the open wake word addon you must have installed, or you have open wake word running on a separate system on your network.

What device is causing this to be discovered?
Is it the new HA Voice hardware I attached?
I feel that’s a red herring because I specifically wanted to remove the Wyoming thing because I think HA Voice has its own thing.

So what else could I have running as a device (whether hardware or some “software” device ) causing this to be detected and need to be ignored?

Also, this indicates to me the integration was not truly removed? And this integration 100% did not come with my default HA installation because I had to explicitly add it as an integration… unless in the interim it’s become part of the core platform?

Just everything feels so complicated to me (and I consider myself an intermediate level HA user with a ton of automations/templates, etc and generally like the platform a ton).

Yes that would be it or the addon. I don’t know if the new device has open wake word on it.

ah checking!

You are 100% right.
I’ve installed the open wakeword addon and just forgotten about it.

It’s not the new HA Voice device because if I proceed and add the suggested device the entity in no way reacts when I use HA.

It’s the addon.

So thanks very much for helping me figure this out.

But more generally, why is the integration not truly removed? It was most definitely not part of the core HA install. In this case you can argue it was good that it was not truyl removed (and never will be once installed?)_since it helped me discover this addon but isn’t it bizarre we cannot remove integrations, ever? They are always lurking… :slight_smile:

The integration isnt discovering it, it’s one of the discovery integrations. The integration isn’t installed, it’s showing you what you can install.

Ok. This is even more confusing.

I distinctly remember part of the instruction was to install the Wyoming integration which I did by following a standard HA page and it had one of those Add Integration fo my HA links I had to do and then probably as a separate step add the addon.

My memory may be wrong on this but I’m FAIRLY certain. This isn’t something that comes with HA.

From what I recall the steps are this:

(1) add wyoming integration
(2) install addon

So to me, the steps to revert my HA installation to its prior state is something like

(A) uninstall addon
(B) uninstall integration

Yet seems that (B) can never be done.

What is wrong with my mental picture? :pray:t2:

Ok my memory is mostly right

Is my understanding of what integration actually are, subtly wrong?
The fact both of you think I’m saying something nonsensical means I’m not fully aligned with how HA integrations actually work or what they are.