Thanks for this @ciB!
I have managed to set mine up a bit differently using just the input select and an automation to call the scripts.
I have also added something which i think is a cool little feature… using Floor Plan to allow me to click / touch a room to begin a cleaning cycle! I am planning to add some type of signal of whether and where the vacuum is running.
If anyone is interested in the setup, my config files are linked below.
Vacuum Config: https://github.com/stanvx/Home-Assistant-Configuration/blob/master/packages/xiaomi_robot_vacuum.yaml
Floorplan Config: https://github.com/stanvx/Home-Assistant-Configuration/blob/master/floorplan_vacuum.yaml