tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
569 stars 103 forks source link

Home Assistant 2023.8.0 - MQTT entities name changes #700

Closed tsightler closed 1 year ago

tsightler commented 1 year ago

Discussed in https://github.com/tsightler/ring-mqtt/discussions/698

Originally posted by **N1c093** August 3, 2023 Starting with Home Assistant 2023.8.0 the MQTT entities name changes. Therefore I get the following warning, after starting my Home Assistant: ``` Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped of the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue. List of affected entities: - lock.haustur_lock - sensor.haustur_info - camera.staubi_rendered_map - binary_sensor.haustur_ding - sensor.haustur_battery - sensor.haustur_wireless ``` ![image](https://github.com/tsightler/ring-mqtt/assets/59510296/a12bc49d-b27b-486e-826f-47f5b0759379) You can find more information in this Home Assistant webpages: https://developers.home-assistant.io/blog/2023-057-21-change-naming-mqtt-entities/ https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099
tsightler commented 1 year ago

As this is not a breaking change until 2024.2 users can simply ignore these messages for now, I'm sure I will have an update that addresses it by then.

If you don't like the warnings then feel free to complain to the HA team about how they decide to "announce" breaking changes by simply releasing new versions with these warning messages telling tens/hundreds of thousands of users to annoy upstream maintainers immediately instead of doing something sane like maybe maintaining a running document of upcoming breaking changes and the date they will be enforced, so maintainers can simply plan for them without users being bothered at all.

scarolan commented 1 year ago

Not cool HA team, not cool at all...

tsightler commented 1 year ago

v5.6.0 has been released and implements the new entity naming which should get rid of the warnings.

maddox commented 1 year ago

Does this rename our entity ids? I’ve been confused by this issue and change. It sounds daunting for those of us using entity ids for a lot of things.

tsightler commented 1 year ago

It should not impact entity ids, definitely not of existing entities (device identifiers did not change so existing entities ids should definitely not change). I guess there's a small chance it could impact entity ids of new devices, but I've tested quite thoroughly and the design goal for the changes was to make the final generated names and entity ids identical to previous versions, just without triggering the warnings.

Note that I'm a user too, and I didn't want to have to change anything in my production setup any more than anyone else. Admittedly, I can't guarantee this 100%, because ring-mqtt itself can't control entity id generation, it can only inderectly influence it, but my testing involved removing devices from my dev instances, including deleting them manually from the device and entity registries, restarting HA, and then letting the devices be rediscovered and re-created. After this I compared the newly generated entity ids to the old ones as well the entity ids in my production instance and, so far, so good.

I don't know why the Home Assistant team decided to surface this issue like it was some huge thing and just confuse people, as the core issue is super simple and non-critical. Note that I don't disagree with the actual change at all, it was needed to bring MQTT entities in line with all other entities in the HA architecture, I just think the current approach is similar to yelling "Fire! Fire! Fire!" because someone struck a single match. Sure, maybe it could eventually lead to a problem, but it makes sense to provide some time to handle it without causing a panic. Admittedly, technically they did, they were just warnings after all, but the wording made it sound so much more ominous than it was.

happydutch commented 11 months ago

Not cool HA team, not cool at all...

I just upgraded HA and spent many hours fixing breaking changes. Multiply that times 5-10 as there is something that breaks almost every couple of months.