That’s odd, seems like it’s ok when i test it. That’s the correct payload anyway.
Do you have “input_number.vacuum_repeat” helper created? If not, it might be receiving repeat: 0 and since it’s false it would do 1 try.
Go to Home Assistant → Developer Tools → Templates and at the end of textbox type:
{% set repeat = states("input_number.vacuum_repeat") | int %}
[{"segments":[16],"repeat":{{ repeat }}}]
On the right side it should return something like:
[{"segments":[16],"repeat": 1}]
With 1 being the value of input_number.vacuum_repeat.
If it’s 0 or something else, you may be using wrong entity name for your input_number.
Or… Ultimately… Your vacuum might be using some other syntax, this is proven to work with S5 Max
Yes! You were right, my “input_number.vacuum_repeat” had the wrong Entity ID. I named my first helper “input_number.vacuum_repeat” so the Entity ID thus became “input_number.input_number.vacuum_repeat”. With the new name “vacuum_repeat” everything is working
good day. use SERVICE XIAOMI_MIIO.VACUUM_CLEAN_SEGMENT in automation. I can not get a replay of cleaning segments. what to do? thanks in advance to those who helped
Sorry for being a bit absent - I was moving and still in the process of getting HA ready. Heating is considered more important than automation of a vacuum these days. Not sure why ;D
Actually, I would like to integrate the crisscross pattern as well as abort/return to dock/start anew.
The second one is kind of important if you have somewhat unregular schedules and just want the robot to automatically find the spot when you’re longer not at home and clean.
So if you’re just 10 minutes away, the robot might be able to clean one room, return to the dock and wait for the next opportunity to clean the rest. Or is not able to clean the room, abort and redo the room on the next opportunity.
Just a note here to say that this all worked really well for me. I made a few foolish mistakes (tried to paste the two automations into scripts, for instance, and accidentally copied/pasted an apostrophe prefacing my input_number. But all is working really well now.
Just a note that probably is obvious but I might as well say it. If you open the Mi Home app when you are trying to figure out the room numbers, you’ll be able to see the room highlighted when your robot is headed that way. It takes a few seconds, but it’s better than waiting and chasing the machine down. I kept a tab open to the “Vacuum paused for 5 minutes…” automation and just clicked on Run Actions as soon as I saw the room highlighted. That made selecting rooms a little easier/quicker than physically chasing them down.
Again, probably obvious to most readers here but worth a mention just in case.
I ran similar issue and I’m wondering if you did manage to solve it?
When I call the script via button below, my vacuum start cleaning and return to base after some seconds. My issue is that I don’t know where I should enter my room ID in button.
Script itself works and call vacuum to start cleaning but only for few seconds as I’m not sure how to tell the script what room ID he should go to.
When I’m testing my script via developer settings as you explained I got no result, nothing happen. What I might done wrong?
Maybe there are better ways, but the below work very good for me (don’t forget to change vacuum.your_vacuum_name by your own vacuum entity_id and the params below by the ones you need).
Hey,
Thanks! It’s all working great, but I was wondering if it’s possible to choose repeats for each room? (or generally for all of them?)
I can of course send the vacuum twice to the same room but it’s different, the roborock does a different route if it’s set to 2-3 repeats
I figured it out using scripts for each room x2 (crosshatch) and combined them in a single automation. The trick was catching the vacuum in the state returning after cleaning one room and then calling the next room script.
Here’s my automation for multiple rooms cleaned 2X with crosshatch pattern.
I know that there are a number of guides on the forum that should guide you. I came from homebridge, so I already had the room numbers. You could slowly figure it out by starting with 16 (1-15 is used for other things). Trigger your script or automation and see what room the robot goes to clean. Keep changing by one number to find each room number.
I already have my room numbers, I actually have a successful daily routine, vacuum all my selected rooms, goes back to charge, and the mop all my selected rooms. It does it every day when no one’s at home. It works great. Only thing it doesn’t do is x2 crosshatch. I’ll give your method a try