Can't delete Xiaomi Gateway

Hello, I’ve set up some door/window xiaomi mijia sensors on my Xiaomi Lumi v3 Gateway, but since I had some problems with them, I would like to remove the entire gateway.

I’ve removed the entire:

xiaomi_aqara:

from the configuration.yaml, but when HA starts up, they’re still there and available, as they were never removed. I removed two of them manually with the remove service, and they’re gone (but now they won’t appear anymore).

Now I’m with following mess:

image

As said, configuration.yaml doesn’t have any xiaomi integration anywhere, but they still show up. How? And how can I remove everything and start up fresh with this integration?

I guess I figured it out!

By calling the remove service, I removed them both in HA and in the official Mi App.

Those who I haven’t removed, appeared on startup because discovery: was in the configuration.yaml, which finds them automatically. Upon removing it, they’re gone for good.

Will update as soon as I get home if I can readd them normally!