Moving between configuration via YAML and integrations via UI

I’ve been trying to use the front-end for new integrations where possible since introduced, however for some reason I went completely off-piste a few nights ago and added a new TP-Link integration via an entry in m configuration.yaml.
The TP-Link strip I configured is working as expected and shows up in the integrations list, however having realised my mistake this evening I’m forced to ask what may be a stupid question:

If I remove the TPLink from the configuration.yaml will the integration be kept, or will I have to recreate it?

I ask because I’ve spent two hours reworking my Google-synced entities to remove duplicated and zombie devices - I’d rather not wind up with some duplicates again.

If you remove it from the YAML, it removes the integration. Then you’d need to set it up again.

Thank you!

Interestingly enough, that doesn’t seem to be the case with my TP-Link integration on my system, runing 0.104.3 in python 3.7 venv on Ubuntu 18.04.

I removed the TP-Link elements from my configuration.yaml and restarted HA expecting to need to re-create the integration. However the integration entry remains intact, with all the related entities retaining all their properties and all automations / other references behaving correctly; no errors or issues were logged.

Two subsequent restarts of HA for other reasons provided no issues.

1 Like

That’s neat, shows how long it’s been since I did the YAML -> UI dance :smiley:

Sorry …
And this is to anyone who knows (ie anyone maybe but me)
How are we supposed to remove integrations now ?
I would have assumed as Tink said that remove the yaml the integration is gone (maybe it’d leave some entities to be manually deleted but …)
I also assumed that add ing an integration from the front end merely (intelligently :rofl: ) added the required yaml in the right place.
(this is probably something I’ve missed in the recent upgrades and docs revisions …
anyone got a link ? )

I think that (for the supported components), tank configuration is automatically imported and becomes an integration accessed through the front end configuration menus.
Those jntegrations can be removed from that menu, yaml only ones just require removing from the config files and a restart to complete.
YMMV.

… but didn’t you just report that wasn’t the case ?

As I said above (perhaps not expressed as clearly as I should have) I believe that components that support the integrations interface are imported from configuration.yaml and become integrations, making the yaml entry irrelevant.
TP-Link is one such component, and that’s the behaviour I saw on my system.

Components that don’t support the integrations interface remain controlled by yaml files only

Okay that makes some sense, the yaml driving the FE integration rather than the FE integration driving the yaml.
So when you go to ‘integrations’ you can the the TP-Link one listed ?

Edited and in bold

I am running into the same question(s) today.

I set up the AVM FRITZ!Box integration https://www.home-assistant.io/integrations/fritzbox/ a few month ago via YAML.
For this integration YAML is deprecated and i removed the YAML entries.
After restart it’s still in the UI integration page and working.

Are YAML integrations really migrated to UI with secrets?

After that i tried with Netatmo integration, also YAML added. Removed YAML entries and restarted. It’s also still in the UI with all devices but not working anymore. Devices shown as unavailable.

Could anybody help clarifying the relation between YAML and UI integrations?

My understanding is that the conversion path varies according to component.

1 Like

You’re right.

I feel a bit stupid now cause the reason while Netatmo integration could not ‘auto’ migrated to UI are the different authentication methods… YAML is with client id and secret and UI is Account Linking
while AVM FRITZ!Box integration is username and password in both. :sweat_smile:

But if you add something via YAML you have to remove both, YAML entries and delete it in UI (if its shown there). This is my experience so far, cause devices only disappear after UI deletion.

Happens to the best of us - every day is a school day.

I’ve gradually moved over to UI configuration from YAML but kept scripts and automations as YAML.