Ok, now I am confused. I am running HA and have installed Mosquitto broker integration. Do I need to do something or notify somebody?
Your broker is an Addon, it’s unrelated to this. The broker as the “Holder of messages”. Nothing has changed with that. The messages have changed. If that makes sense.
Z2M sends messages to Broker, while HA listens to messages on Broker.
But I got the repair notification “Discovered entities with a name that starts with the device name”. It lists all my MQTT-entities from Mosquitto.
What’s creating those entities in the broker?
Something is creating topics on your broker.
Ok. I have roomassistant and a custom ESP8266 module for Ikea air quality sensor.
Then you should notify those platforms of this change.
This behavior was useful for grouping entities together if you have multiple that broadcast the same suffix.
For instance, my MQTT broker broadcasts sleep/wake buttons for multiple devices which prefixes the device name in the IDs as
button.device2_sleep, etc. This is useful since it groups all sensors to a specific entity by their name in the prefix and when searching or using in automations, you can type
button.device1_ and see all associated buttons for this device quite easily, not to mention it is much easier to remember in scripts - however having to now remove the name will make it pretty anonymous and harder to identify; am I expected to name them
Yes I could instead add it to the entity name, however displaying this entity name across HA will now as a result unnecessarily have the device name in it.
And it still works that way and this change doesn’t affect the autogenerated entity_id. Please try to fully read the post. I’ll make a large note that this change doesn’t affect the entity_id, just like the blog post does.
Thanks for the clarification, the original post was missing this information.
The new deprecation/repair warning in HA settings is warning me of affected devices that have the device name in the entity name, however all of the entity_id’s shown in this warning in my instance do not have the device name in the entity name which is confusing behaviour.
Do you have a snippit if the discovery information?
See output below.
Discovered entities with a name that starts with the device name
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:
None of these entities have the device name in the entity name, it is only in the entity_id itself that has the device name which as you have stated is expected behaviour.
Right but what are you sending to discovery? What’s creating the mqtt information?
These entities are being broadcast by HASS.Agent which I believe does not broadcast a name with the entity, just an entity_id that is specified by the end user on the agent itself.
Hass agent needs to address this change. They are providing the device name in the entity name. I recommend opening an issue with them and ignoring the warning until it’s fixed, just like z2m.
I see, thanks for clarifying - I have taken a look at the incoming name received in MQTT for these devices and it does include the device name in the entity name. I guess regardless of whether the device name has already been changed on HA, since HASS.Agent still pushes this via MQTT it displays the warning.
Issue reference for any other HASS.Agent users who stumble upon this: Bug: MQTT entity name starts with the device name in your config - HA 2023.8 · Issue #337 · LAB02-Research/HASS.Agent · GitHub
Yes, that is the case.
I will never understand why a change like this was not announced to developers first and introduced when key integrations had had a chance to update their stuff. Like 2-3 months later. It cannot be urgent how discovered mqtt devices are named.
I do not want to see bogus repair messages and log messages and risk missing important issues so I will skip this release for now. You should silence these messages in next .1 release instead of creating all this fear and uncertainty. I am sure the devs are aware of it now
This is the announcement. They have 6 months to adapt. You can ignore the repair with 1 click and it will never show up again. I would love it if you spent time learning the system instead of immediately assuming the worse in every situation.
It is not just an announcement. It is actual code released. It is a horrible way to scare 1000s of users with messages they should never need to see. That is the last thing I am saying in this thread