New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi_aqara cover generated same entity with tail "_2" #13522
Comments
This is the expected behavior. Entity IDs are generated based on the friendly name of the entity. And if the friendly name of two entities are the same, What the entity registry does is it allows you to manually change the entity id by the user. For example you can now rename your |
@OttoWinter Thanks for the infomation about "_2" tailing and usage for entity registry. But the problem is if I made some automation with this entity, it's not working sometimes because the device is matched with another _2 entity, not the original one. I think xiaomi aqara platform has a bit problem because the device already has entity and unique id, the platform makes another one. Other xiaomi zigbee devices are super fine, but not the cover. cover.curtain_158d0001fd5065: cover.curtain_158d0001fd5065_2: cover has more than one prefix for generated unique_id.
Other devices have just one prefix. |
First up, I don't know anything about xiaomi, but there are probably reasons for splitting up the cover platform into two entities. Now, I think the behavior you're referring to with having "unstable" entity IDs is from before the entity registry times. Because now, you can override which entity ID home assistant uses for entities in the entity registry. For example, if you want to rename the entity ID of your cover.curtain_number_one:
name:
platform: xiaomi_aqara
unique_id: status_status_pos_curtain_level158d0001fd5065
cover.curtain_number_two:
name:
platform: xiaomi_aqara
unique_id: pos_curtain_level_status_status158d0001fd5065 Now the entity IDs of the covers should be |
@OttoWinter OK I see. I understand there is no way to merge these entities fundamentally or prevent split. The weird thing is if I don't reboot or restart HA, it's just fine not be split. But for the automation, I'll handle two entities. Thanks again with kind explanation about this problem. :) |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
@balloobbot Same issues. version 0.74.0 cover.curtain_158d00020e43f1_2: These 2 curtains are same curtain. please help me. |
LOL, it is a bug. In And in Fun thing here is in python 3.5 and below, |
If this is fixed, will: |
@awarecan: Do you know if this bug is already fixed? |
@Danielhiversen I know we are all busy, but if I buy you a beer, can you take a look here? |
I do not have any xioami curtains, but can you try this What other sensor does your motion sensor has? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I have a similar issue. Since a couple of weeks (possibly one of the last updates) one of my door-window sensors stopped working in HA. The error is:
I have 62 devices, 3 gateways and it is always this sensor causing problems (but it works fine in the Xiaomi app & automations so I tend to exclude it is and hardware or battery issue). Would it make sense to manually remove the entity from core.entity_registry and see if it gets added correctly? |
em... this bug works for me... |
i have solved this by upgrading my python verion to 3.7 in pi |
…t will not be preserved (Closes: home-assistant#13522)
@syssi I got hit by this too. Will your fix restore slugified ids? |
Yes. The PR will fix/avoid the issue. I hope you haven't touched your |
…t will not be preserved (Closes: home-assistant#13522) (home-assistant#19766)
…t will not be preserved (Closes: home-assistant#13522) (home-assistant#19766)
…t will not be preserved (Closes: home-assistant#13522) (home-assistant#19766)
Home Assistant release with the issue:
0.65.6
Last working Home Assistant release (if known):
0.65.6
Operating environment (Hass.io/Docker/Windows/etc.):
Raspberry pi with virtual env. followed install instruction.
Component/platform:
Xiaomi Gateway (Aqara) / Xiaomi Cover
Description of problem:
sometimes entity_registry.yaml makes same entity with "_2" tail and unique ids.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
nothing related for this issue but I'm using with custom component for Smart Mi Fan from https://github.com/syssi/chuangmi_ir
follwing log is caused by offlined fan. Just i'm not sure this one affect or not.
The text was updated successfully, but these errors were encountered: