Closed brgerig closed 4 years ago
I have the same issue. There's a thread on the Home Assistant forums documenting the same bug. https://community.home-assistant.io/t/vera-error-entity-ids-already-exist-unable-to-toggle-devices-on-and-off/171397
This is an odd one. Seems likely that something has changed in HA that causes this. given that it seems intermittent it might even be some sort of timing issue
Given that this library just gets the ids from Vera - it's hard to imagine there is anything here.
I guess it' s possible that the HA wrapper needs modification - although again that's pretty simple.
Don't know what to suggest - except to see if there are other similar HA id issues in the recent release.
It's actually been an issue for a while, at least since I began using Home Assistant back in the .80's. Today it happened for probably 6+ restarts in a row before I finally got a clean restart without Vera device errors.
I'm aware of a bug with the HA integration that can cause this. The short of it is this will take a while to fix. I already have one PR in that modernizes the vera config. Once that lands, then we'll gave the code in place to fix the unique ID issue. Once the id fix is in place, you'll have to remove your existing config from vera then re add it. This will result in entirely new entity IDs.
The cause of the issue is that the vera integration sets the entity unique id using the vera id from the hub. The entity unique id is suppose to be unique in the world. So it's often a device MAC address. The problem is that Vera's device ids are far from unique as it's an auto incrementing integer starting at 1.
The fix I'll be submitting will make the unique ID the hub serial number concatenated with the device id. Something like "vera_234565433_10".
That all being said, getting changes merged in HA takes a while as they're maintainers are focused on quality and stability. So you won't see a fix for a couple months. On the plus side, this also opens up the ability to support multiple vera controllers.
Great news! Thanks for the update, and for the work you're putting in to getting it fixed.
Closing as this will be resolved in home assistant.
When restarting Home Assistant, I very frequently get errors in the log similar to the following:
There are usually errors for most of my devices. When this happens, HA is unable to control them. My only option is to keep restarting HA until the errors don't show up. I haven't been able to figure out any pattern as to when this does or doesn't happen.