Received message on illegal discovery topic 'homeassistant/sensor/miscale/Cédric/config'

Hello,
I’m having trouble with the Xiaomi Mi Scale module from @lolouk44.

I created a user named Cédric, with an accent, before realizing it wasn’t a good idea. So, I renamed it without the accent, but I’m still getting alerts.

I deleted the user, restarted Home Assistant, and even uninstalled the application by deleting its files, but the problem persists.
Can you help me?

HCI_DEV: hci0
BLUEPY_PASSIVE_SCAN: false
MISCALE_MAC: 5C:CA:D3:XX:XX:XX
MQTT_PREFIX: miscale
MQTT_HOST: core-mosquitto
MQTT_USERNAME: mqtt
MQTT_PASSWORD: mqtt
MQTT_PORT: 1883
MQTT_RETAIN: true
MQTT_DISCOVERY: true
MQTT_DISCOVERY_PREFIX: homeassistant
MQTT_TLS_CACERTS: Path to CA Cert File
MQTT_TLS_INSECURE: false
DEBUG_LEVEL: error
USERS:
  - NAME: Cedric
    SEX: male
    GT: 81
    LT: 90
    HEIGHT: 186
    DOB: "1979-12-16"

Enregistreur: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:393
intégration: MQTT (documentation, problèmes)
S'est produit pour la première fois: 21:25:09 (1 occurrence)
Dernier enregistrement: 21:25:09

Received message on illegal discovery topic 'homeassistant/sensor/miscale/Cédric/config'. The topic contains non allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic

I have a similar frustration. I want to rename some of my devices to be more descriptive. This is sort of possible, but the device, the name used in automations and overview, etc., name remains the same. :frowning:

Are we stuck with those name?

Delete the discovery topic in your MQTT broker.

The error calls out the topic to delete: homeassistant/sensor/miscale/Cédric/config

If it’s stubborn after clearing that topic and restarting, you may have to use something like MQTT Explorer to clear the topic.
Troubleshooting MQTT? MQTT-Explorer can help you be successful!
If you have Add-ons available, try adding this Add-on repository to your Add-on list. GitHub - GollumDom/addon-repository.
With this you can see that the broker sees and likely find the bug.

Hello, I can’t delete it; it’s not present in the MQTT broker.

I just deleted it in MQTT Explorer.

Check after a restart that it doesn’t come back. If it does, it’s stil in HA somewhere and HA posted it in the broker again.

1 Like

I successfully deleted it via MQTT Explorer, yet it keeps reappearing.

Recorder: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:393
Integration: MQTT (documentation, issues)
First occurred: 15:04:40 (1 occurrence)
Last recorded: 15:04:40

Received message on illegal discovery topic ‘homeassistant/sensor/miscale/Cédric/config’. The topic contains non-allowed characters. For more information see MQTT - Home Assistant

That means your device is creating the topic. You have to fix it in your device. Your device meaning the lolouk44 addon. That’s what is creating the discovery. Turn off the discovery, delete the topic, restart HA. The error should not be present. If it is, make sure your configuration files with the mqtt section do not have that topic listed.

Where can I find this configuration file?

Configuration.yaml

Haaaaaaaaaaaa I found it !

Wait, so you weren’t actually deleting the topic before when you said you did?

FYI…

1 Like

Yes yes, but not in the right place. Thank you for the information, to tell the truth, I didn’t pay attention to the path.