Home Assistant 2023.8 Brings New MQTT-Related Error Messages — But Don't Worry, Say Maintainers
A new anti-duplication system introduced in Home Assistant will continue to add errors to the logs, until upstream MQTT libraries are fixed.
An update to Home Assistant has users puzzling over new entries in its logs — but the software's maintainers say the errors are safe to ignore, pending MQTT-related third-party integration projects updating their libraries to accommodate a naming change.
"There will be MQTT name changes in the next release of the [Home Assistant] software," semi-pseudonymous project contributor Petro announced on the Home Assistant forum. "There is nothing to worry about, your names are safe. However the change caused addons like [Zigbee2MQTT] (and other MQTT integrations) to update their discovery information. As it stands, Z2M will not be able to release a version with this fix until September 2023. During that time a warning will be in your logs indicating that there is an issue. You can safely ignore this warning."
The spurious errors are being caused, Petro explains, by a tendency for MQTT integrations like Z2M to duplicate data between device and entity names — causing, when the two are concatenated, awkward display names like "Zooz ZEN04 Zooz ZEN04 Power." While earlier Home Assistant versions simply ignored this, the latest version will enforce a fix: setting the entity name to null if it encounters duplication.
"The change states that MQTT should not provide the device name in the entity names that are attached to the device. So if your upstream MQTT provider is supplying a device name inside the entity name, they should stop providing that information," Petro says of what needs to happen for the errors to go away. "They should only provide the device name to the device, not the entity. You have to identify the software that is creating the messages. This software is not controlled by HA. Once you determine the origin of the messages, open an issue on that software’s page explaining this change."
Once the upstream libraries have been updated to accommodate the change, the errors should disappear from the log — but there's no timeline on when, or for projects which have become unmaintained but are still functional if, this will take place. For end-users, Petro has one key piece of advice: "you can’t fix it," the developer notes, "you can only notify people that a fix needs to happen."
More information is available in the forum thread; the change went live in Home Assistant 2023.8, released yesterday.
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.