3 min read

The robot cleans by your rules: tasks by room, floor type and a door check

A script in Home Assistant gives the robot rooms, floor type and level of dirt. If the door of the room is closed, the task doesn’t start, and a queue keeps the tasks in order.

Level
Advanced
Active time
90–180 minutes

The robot cleans “everything”, but you want the kitchen right away and more thoroughly, and in the kids’ room only dry. You also want it not to hit a closed door. A script in Home Assistant passes it these rules.

What you will get

A script that receives the rooms, the floor type (tiles or wood) and the level of dirt. From them it chooses the mode, suction power, water and number of passes. A second version of the script doesn’t start if the door of the room is closed.

What we need

  • A robot vacuum that Home Assistant controls and that accepts a room-cleaning command. Marto uses the Eufy X10 Pro Omni. We don’t sell robots, so there is no product link;
  • Scripts and helpers in Home Assistant: input_text for the current and the last task and counter for the queue;
  • Optionally, door sensors for the rooms.

How it works

The script is in mode queued: the second task waits for the first. Before each task it waits for the robot to be on the base and for the previous task to have finished. Then it sends room_clean with parameters and follows the state to the end. At the end it records the result.

Marto’s rules

  • Mode. Tiles: vacuum and wet cleaning for regular and deep cleaning, vacuum only for “dirty”. Wood: vacuum only, and for deep also wet;
  • Passes. One for regular cleaning and for wood on deep, otherwise two;
  • Suction. Standard for regular, Max otherwise;
  • Water. Tiles: Medium for regular, High for deep; otherwise Low.

These values are from his home and his robot. They are an example, not a recommendation for your floor.

Door check

The “door safe” script also gets a field for a door sensor. If the sensor is “on” (the door is open) or the field is empty, the robot goes. Otherwise the task doesn’t start, and “Blocked: door closed” is recorded in “last task”.

Steps

  1. Find the room numbers (room_ids) in the robot’s app or in its integration.
  2. Make input_text.robovac_current_job, input_text.robovac_last_completed_job and counter.robovac_queue.
  3. Create a script with fields for rooms, task name, floor type and level of dirt. Its mode is queued.
  4. In the script, calculate the mode by your rules and call vacuum.send_command using room_clean for the robot.
  5. Add a wait and a record of the result: success, error or timeout.
  6. Make a second version with a field for a door sensor, if you need the check.

The parameters of room_clean depend on the integration and the model. Copy them from the documentation of your integration, not from this article.

Checking the result

  • Two tasks one after the other run one after the other;
  • A closed door doesn’t let the robot go and records the reason;
  • After a robot error “Failed” shows in “last task”.

If it doesn’t work

  • The robot doesn’t go → it is not “docked” or “idle” → check its state;
  • The task hangs → the task state doesn’t reach “Completed” → check the status entity;
  • The queue grows → the counter doesn’t decrease on error → add a decrement in all branches.

Limitations

  • The robot can get stuck if there are cables, slippers or toys on the floor: tidy the floor before cleaning;
  • Wet cleaning of a wooden floor: follow the instructions of the floor manufacturer and of the robot;
  • The script doesn’t know whether there is a person or an animal in the robot’s way.

Sources and verification status

Checked against the documentation and Marto’s Home Assistant (read-only), 22.11.2026. The commands and parameters of room_clean are specific to Marto’s integration.

At home

Marto

In Marto’s Home Assistant, two scripts make the Eufy X10 Pro Omni clean by room according to the floor and the dirt. The second waits for an open door.

Need a hand?

We can set up and install everything in this project. In some regions we install it ourselves — ask us.

Contact us

Related projects

Added to cart

Real Home Automations

Sign in to your account

With a code sent to your email

Continue with Google
or

By continuing, you accept the Terms and Conditions and the Privacy Policy.