Skip to content
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

MQTT entity name starts with the device name #18

Open
definitio opened this issue Aug 3, 2023 · 2 comments · May be fixed by #19
Open

MQTT entity name starts with the device name #18

definitio opened this issue Aug 3, 2023 · 2 comments · May be fixed by #19

Comments

@definitio
Copy link

A breaking change was introduced in Home Assistant 2023.8 involving naming of MQTT entities.

The following warning is logged by Home Assistant:

2023-08-03 10:52:24.376 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'availability_topic': 'wifi/access-point-4/status', 'device': {'connections': [['mac', '00:00:00:00:00:0']], 'name': 'Xiaomi Redmi K20', 'via_device': 'access-point-4', 'identifiers': []}, 'icon': 'mdi:wifi-marker', 'json_attributes_topic': 'wifi/station/access-point-4/00-00-00-00-00-00/attrs', 'name': 'Xiaomi Redmi K20 access-point-4', 'object_id': '000000000000_access-point-4', 'payload_available': 'online', 'payload_home': 'connected', 'payload_not_available': 'offline', 'payload_not_home': 'not_connected', 'qos': 2, 'source_type': 'router', 'state_topic': 'wifi/station/access-point-4/00-00-00-00-00-00/state', 'unique_id': 'wifipresence_000000000000_access-point-4', 'encoding': 'utf-8', 'enabled_by_default': True, 'payload_reset': 'None', 'availability_mode': 'latest'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Access-point-4'
@Gopten
Copy link

Gopten commented Aug 3, 2023

Yeah saw that. Only have 7 months to find a fix. I found it a bit difficult to understand what was going to happen then. Possibly just some added stuff to the name or unique id then and some adjustments to some scripts and automations to account for new names. I wonder if can just adjust something in the wif-presence config to get around this. Must give it a go and see.

@awilliams
Copy link
Owner

Thanks, we'll have to update the naming convention to match these new requirements.
https://developers.home-assistant.io/blog/2023-057-21-change-naming-mqtt-entities/

@awilliams awilliams linked a pull request Oct 22, 2023 that will close this issue
awilliams added a commit that referenced this issue Oct 22, 2023
This seems to fix the new HA error of:
> MQTT entity name starts with the device name in your config

Also:
The Homeassistant setup needs updating for newer version. This allows
for a basic instance of HASS to be run via docker compose, and then
for wifi-presence to send events to it via MQTT.

Fixes #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants