Xiaomi Vacuum Integration Broken

In the last couple of week, my vacuum cleaner integration stopped working. I’m on HA version 2021.7.2.

Here is my config entry:

vacuum:
  - platform: xiaomi_miio
    host: 192.168.1.71
    token: !secret vacuum_token

Whenever I try to interact with the vacuum entity either with a dashboard custom card, or in the developer tools, I get messages like this:

2021-07-17 21:31:14 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [22380794307152] Received {‘type’: ‘execute_script’, ‘sequence’: [{‘service’: ‘vacuum.locate’, ‘target’: {‘entity_id’: ‘vacuum.xiaomi_vacuum_cleaner’}}], ‘id’: 62}

2021-07-17 21:31:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=vacuum, service=locate, service_data=entity_id=[‘vacuum.xiaomi_vacuum_cleaner’]>
2021-07-17 21:31:14 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities vacuum.xiaomi_vacuum_cleaner

The vacuum works correctly from the Mi Home app.

Under developers tools, I can see this entity: vacuum.xiaomi_vacuum_cleaner and its state. Currently reported as “docked.”

I confirmed that my vacuum IP address is still correct.

I con firmed that my token is still good. I re-ran the extraction tool and it produced the token I’ve been using for several months.

Thoughts?

I thought Xiaomi Miio configuration was moved to the GUI. Do you get a warning about this in logs when Home Assistant starts? Try removing the vacuum: section from your configuration.yaml and restarting Home Assistant.
See 2021.4 release notes.

That was it. Thanks!

I don’t recall seeing any guidance on this change.

I assume this means the token is no longer needed? I didn’t provide that in the integration config. Just my userid/password.

I have to say, as much fun as HA has been, it seems to be a constant issue of chasing problems. APIs that we depend on are changing all the time. For example, right now, my Nexia API is broken, so I have to fix that to get my thermostat back online. Alexa/captcha breaks on a biweekly basis, so I have to keep fixing that. Improvements like this to move configuration from one place to another crop up.

Since we are fundamentally dependent on APIs that don’t come with a service level agreement, I guess we are forever going to be chasing things…

Larry

You still need the token if you check the “Configure manually (not recommended)” checkbox without entering your username/password and click next. I guess the token extraction process just got built into Home Assistant.
I had no problems migrating my vacuum from yaml config. I just saw the warning in my logs, removed the vacuum from my configuration.yaml and everything kept working. I didn’t need to delete the integration and set it up again like you did.
I would also prefer all configuration to stay in configuration.yaml, but understand the reasons described here: The future of YAML - Home Assistant