Confused since 0.97 upgrade

I have upgraded to 0.97 and all working, except my entities seems to be all confused.
I mainly use an integration with a local UniFi controller for wifi “home” and “away”
However this has all got confused, the old wifi entities are all away and there is a whole set of new wifi entities (for the same devices!)
On the home page (which is default) all of the entities are “away” because of this.
The “source type” on these entities is blank.
What is the neatest/correct way to fix?

1 Like

I think this is related to https://github.com/home-assistant/home-assistant/issues/25764
but I am not exactly sure how!

What a mess!
I now have duplicate entities all over the place. For instance, 3 entities matching my iphone.

If there a way to reset this whole thing and start again - keeping only the config files?
Note to self: don’t take any updates for a while!

1 Like

delete them using the entity registry
Configuration > Entity Registry
select the one you want, once it opens, select delete

Hi I had the same reaction. What a… This will take …
But it is not as bad as it looks.
You do few steps.
First you look for the file known_devices.yaml which is in the same directory as configuration.yaml.
If you use the any other device trackers like the Home Assistant app for IOS you will have a few entries for these in this file. And then the extreme flood of all the devices your Unifi devicer tracker has automatically added. What you do is delete all the devices that are from Unifi device tracker. If you do not have any other device trackers, just delete the whole file.
You can also delete the whole file and later just let Home Assistant populate the file again. In my file I have two entries. One for my iPhone and one for my wife’s iPhone. Everything else is Unifi. They are easy to spot because all the Unifi entries have mac addresses.
Next go to Configuration -> Integrations -> Unifi Controllers and delete the whole integration. Open it and click the trash can.
Now you restart Home assistant. This cleans out all those device tracker objects
Then go to Configuration -> Integrations and click the + sign. Find the Unifi Controller and add it again. All it needs is IP address, username, and password. It defaults to ignore valid certificate which is what you normally want.
Poof - all your Unifi device trackers are back

Last if you have some particular devices that you manually had renamed in known_devices.yaml you now do this the normal way that you redefine any entity name in Home Assistant. From the Unifi integration where you see all the devices - click on the device and the small gear icon. Then you can both change entity name and add a Friendly name. Just make sure that both your Unifi entity names and your known_devices.yaml entities match the places you used them in automation and definitions of persons. You probably only used 3-4 devices out of all of them - the rest you do not care about

1 Like

Thanks all for the replies.

I did this:

  • shutdown HA
  • deleted core* from .storage
  • deleted know_devices.yaml (doesn’t seem to be used any more?)
  • deleted home-assistant_v2.db
  • restarted HA

Everything looks ok and normal again.
I really must stop taking these updates so quickly!
Thanks again

Thanks for sharing this info.
I seem to be stuck readding the integration now. It just fails with “no service found” and my unifi controller addon no longer loads either.

The integration can only succeed if there is a running Unifi controller with a working username and password.
So if your Unifi controller is a hass.io addon then you need to troubleshoot why that will not start first.

I personally run my Unifi controller outside the Home Assistant docker environment. I installed mine as a normal apt get installation on the same machine that I installed home assistant on. It takes more knowledge but it is also nice to keep dependencies separate and there is a good installation documentation from Ubiquiti.

2 Likes

@KennethLavrsen Thanks for the reply.
I do run the Unifi controller separately although it is on the same RPi.
I don’t use docker or hass.io. Everything in native Debian (well, RPi version!)

I have detection working now, but automation still isn’t working. I had a bug which seems to be fixed in 0.97.2 which is what I am using now.
However automation still doesn’t work :frowning:
It seems to relate to entities which have had some customisation but there are no errors anywhere so its hard to debug.

Thanks
Paul