I hadn’t found a way to do it easily, but I just used the developer section to send a command to app_segment_clean with various numbers. I had the xiaomi app open when I did it, and you could see which rooms were highlighted.
I wrote those down, and then created scripts to clean different areas, for example, this is the script to vacuum the living areas
Brilliant, @dgaust!! Used your script and by trial and error, I am slowing getting all my rooms set up on my HA. Thanks for sharing. That was exactly the guidance I needed to get started.
I was using the coordinates method on this past, but I often had to break a room into many boxes in order to get the job done. With this, the cleaning pattern in much better.
get_room_mapping gives me an array with 6 rooms numbered 16-22, which matches my setup. However, when trying to clean a specific room it always goes to the same one (it lights up in the Mi Home app as well). Any idea what’s going on?
Did it actually went to the same room each time or you did not wait and stop it? When I was figuring out the rooms I’ve put 20s delay before pausing it and trying next number. I’ve seen similar behaviour without delay.
Thanks, that was it! I was too busy going by the map in the Mi Home app to actually see if the vacuum went to the correct room. The app shows the same room everytime, but it actually goes to the right one on command.
Hi everyone,
I just retrieved all my room numbers, and plan to write the associated scripts.
Does the room order matters when specifying the params values ?
Main bedroom and associated dressing are respectively number 4 and 6, room number 5 is a bathroom at the opposed side of the corridor. [4,5,6] will be treated differently than [4,6,5] ?
Another question, what happens if the dressing door, or another door is closed ? The vacuum will go to the next planned room or will stop because the room is unreachable ?
I could test the differents usages, but if someone already has the answers, i’ll save time.
Thanks for the hint with cleaning by segments it’s exactly what I was looking for, I was experimenting with zone parameters, which haven’t worked for me
Currently I am receiving a notification after cleaning with cleaning time and area, I would like to get a notification with something like “Kitchen is cleaned”. Any idea how to achieve?
can you please give me a hand? I have the room numbers, I have the scripts created and the automation. However, the automation does not get triggered.
Here is my Input Select:
vacuum_house_room:
name: Choose a room to clean
options:
- Select Input
- Entrance Hall
- Kitchen
- Master Bedroom
- Service Bathroom
- Office
- Living Room
- Kids Bedroom
- Master Bathroom
initial: Select Input
If I select Office from the Lovelace Dashboard, it does not start. If I trigger the script manually - it works fine. Any ideas? I am missing something I am sure of it.
When I try to execute the automation, the following error occurs:
While executing automation automation.start_vacuuming_room:
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['data_template']
@pplucky - good catch - I commented data_template - and adjusted the code indent - and now it triggered. I knew it was a simple error - but 2 pair of eyes are better than one.