Xiaomi Vacuum toggle for HomeKit - or creating a “start clean” switch

Hi all,

Slowly learning my way around HA but my lack of knowledge is catching up with me.

Got the xiaomi vacuum installed (getting that token was a pain!) but the toggle does not commence cleaning. Once I open the vacuum in HA, I can select “start clean” and it starts, but I’m looking for a toggle that works so I can expose it to HomeKit.

Does anyone know what I can do? Is there a way to change the toggle in the “xiaomi vacuum” card to set off the “start clean” and get that to show up in HomeKit? I also found the service that needs to be called, but couldn’t create a toggle for just calling that service.

Any help is much appreciated. Thank you

Update. Still can’t get the Vacuum to show in HomeKit but Managed a janky work around to create this (see pic) that triggers the “start clean” but not sure how to make this card appear in HomeKit. For some reason neither vacuum entries in HA are appearing in HomeKit. Any ideas on getting either to appear? Thanks!

You could create an input_boolean or input_select to do what you want and then use a template to get the vacuum state.

Make sure to add the input_boolean domain to your homekit configuration as well.