Re-add deleted MQTT vacuum

I set up a Xiaomi Mi Robot vacuum with Valetudo and added it to Home Assistant using MQTT with the instructions here: https://www.home-assistant.io/integrations/vacuum.mqtt/

It worked initially and the device showed up in MQTT integration devices.

I wanted it to have a slightly different name, though. The device wouldn’t let me rename it with the HA GUI, so I deleted it using the DELETE button that shows up when you click on a device in the Configuration > Devices view under the “Device info” card.

I have now tried everything I can think of to get HA to re-add the device but it just won’t. It’s like there is some logic somewhere that is causing it to be ignored on the front end. I can even see the vacuum get rediscovered by the homeassistant > vacuum topic with MQTT Explorer. So I know MQTT is working and I know HA is discovering it via MQTT. It just won’t show up in the GUI anywhere that I can find.

There is nothing relevant in the HA log. The Mosquitto Add-on log shows messages like this when it’s newly added:

1609723041: New connection from 192.168.x.x on port 1883.
[INFO] found USERNAME on local database
1609723041: New client connected from 192.168.x.x as mqttjs_3022a791 (p2, c1, k60, u'USERNAME').

I have tried all of the following:

  • Changing the MQTT Topic Prefix in Valetudo.
  • Restarting HA
  • Restarting the HA supervisor
  • Restarting the Vacuum
  • Removing and re-adding the MQTT vacuum config with an HA reboot in between
  • Deleting the MQTT devices with MQTT explorer from the valetudo topic and the homeassistant > vacuum topic.
  • Removing and re-adding the Mosquitto broker add-on
  • Removing a delete_devices entry for the old device from the core.device_registry file (I was pretty desperate at this point).

Any ideas would be appreciated. I’m all out.

Give it a unique_id.

I just tried adding a unique_id, but unfortunately that doesn’t seem to have made a difference.

vacuum:
  - platform: mqtt
    unique_id: "Mi_Robot"

I’m in the same trouble did you find a solution by now?