-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Advice on how to use with home assistant and naming things #4096
Comments
The So the options are:
|
Thank you for the clear explanation. Guess it makes sense it doesn't update the entity_id by itself. If I get annoyed by this then I guess I might make a script that changes the entity_id in the |
I was trying to find an easy way to also change HA's entity_id for some time as well and reading your issue, I think I found another option: If you actively delete all of the device's entities from Home Assistant before you rename, HA will accept the new name also as the entity_id (and not the friendly name only). Deletion should be done via MQTT also (publish an empty payload to all config topics) and I found a relatively easy way to do this here (picture taken from there also): So the complete procedure would be:
@Koenkk Maybe z2m could delete the entities from HA first, wait a few seconds and then publish the new name when renaming a device? This way it could work seamlessly at least as long as Home Assistant is running while renaming... Edited to use device_id instead of friendly_name. |
@felixstorm good idea! implemented |
Ohhhh thats why my devices got renamed automatically and i was needed to rename them back manually...great |
can we have some kind of a switch on that? entity_id and friendly name little bit different and this kind of "enhancements" can |
+1 |
@Koenkk Technically, recreation of ha entities is a possible solution. But one should have choices either to recreate entities automatically or do it manually (current deconz logic, for example), since automatic deletion of entities could be very damaging for existing legacy in the ha, such as automations, lovelace, etc. |
What's the status on this? Does it only change entity id when I change the friendly name? Or will it also change entity id of devices I already renamed in the past? Because although I hate the 0x entity id's and manually renamed most, the key is most... I would hate it even more if current automations en cards stop working with this update... 🙄 |
I've updated the behaviour:
|
And if you rename through the devices.yaml? (Which I used to do...) |
That is the same as:
|
Thanks! Good and a shame at the same time. 😛 So what would be the easiest way to rename the friendly names and entities? Or should I just wait for something like Z2M Assistant to support it? |
Yes, or the recently integrated frontend (#4266) ( |
Sounds great! Thanks! |
thanks a lot, Koen! will wait for the next update to install. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
This works almost... Living Room - door sensor in ZigBee2MQTT Change name in Home Assistant to Door Sensor Then I change in ZigBee2MQTT to Sensor Door and disable change in Home Assistant I get link quality, contact and battery to change their names. |
any chance we can have a setting to auto tick the "Update Home Assistant entity ID" option when renaming devices? edit: |
Can this option be set in the yaml config for a device? |
Hi,
Just starting with integrating the zigbee2mqtt in my home assistant setup.
Everything in home assistant has to be referenced with an enity_id.
When using home assistant and zigbee2mqtt with discovery all entities get a name like
binary_sensor.0x00158d00053f84dc_contact
What are the possible ways to change this entity ID. Is this only through the UI or is there also a way to do it through some configuration (either in the home assistant or in the zigbee2mqtt)? That way I can put it my source control. It would also be a lot easier to search.
What would you advice?
The text was updated successfully, but these errors were encountered: