Hey, I’ll try to explain how I’ve set things up and how everything works.
THE CLEANING SCRIPT
alias: Clean Room
fields:
mode:
name: Mode
description: Vacuum or mop a room
required: true
selector:
select:
mode: dropdown
options:
- Vacuum
- Mop
room:
name: Room
description: The room to clean
required: true
selector:
select:
mode: dropdown
options:
- label: Bedroom
value: "18"
- label: Hallway
value: "20"
- label: Kitchen
value: "16"
- label: Living Room
value: "17"
- label: Studio
value: "19"
sequence:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: sensor.rumen_status
state: idle
- condition: state
entity_id: sensor.rumen_status
state: returning_home
- condition: state
entity_id: sensor.rumen_status
state: charging
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ mode == 'Mop' }}"
sequence:
- device_id: <YOUR DEVICE ID>
domain: select
entity_id: select.rumen_mop_intensity
type: select_option
option: intense
- service: vacuum.set_fan_speed
data:
fan_speed: balanced
target:
entity_id: vacuum.rumen
- service: vacuum.send_command
data:
command: app_segment_clean
params:
- segments:
- "{{ room }}"
repeat: 2
target:
entity_id: vacuum.rumen
- service: input_boolean.turn_on
data: {}
target:
entity_id: "{{ 'input_boolean.rumen_mopping_' + room }}"
- service: input_text.set_value
data:
value: "{{ room }}"
target:
entity_id: input_text.rumen_last_room
- conditions:
- condition: template
value_template: "{{ mode == 'Vacuum' }}"
sequence:
- device_id: <YOUR DEVICE ID>
domain: select
entity_id: select.rumen_mop_intensity
type: select_option
option: "off"
- service: vacuum.set_fan_speed
data:
fan_speed: max
target:
entity_id: vacuum.rumen
- service: vacuum.send_command
data:
command: app_segment_clean
params:
- segments:
- "{{ room }}"
repeat: 1
target:
entity_id: vacuum.rumen
- service: input_boolean.turn_on
data: {}
target:
entity_id: "{{ 'input_boolean.rumen_vacuuming_' + room }}"
- service: input_text.set_value
data:
value: "{{ room }}"
target:
entity_id: input_text.rumen_last_room
default:
- wait_for_trigger:
- platform: state
entity_id:
- sensor.rumen_status
to: idle
- platform: state
entity_id:
- sensor.rumen_status
to: returning_home
- platform: state
entity_id:
- sensor.rumen_status
to: charging
continue_on_timeout: false
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.rumen_mopping_16
- input_boolean.rumen_mopping_17
- input_boolean.rumen_mopping_18
- input_boolean.rumen_mopping_19
- input_boolean.rumen_mopping_21
- input_boolean.rumen_vacuuming_16
- input_boolean.rumen_vacuuming_17
- input_boolean.rumen_vacuuming_18
- input_boolean.rumen_vacuuming_19
- input_boolean.rumen_vacuuming_21
- choose:
- conditions:
- condition: template
value_template: "{{ mode == 'Mop' }}"
sequence:
- device_id: <YOUR DEVICE ID>
domain: select
entity_id: select.rumen_mop_intensity
type: select_option
option: intense
- service: vacuum.set_fan_speed
data:
fan_speed: balanced
target:
entity_id: vacuum.rumen
- service: vacuum.send_command
data:
command: app_segment_clean
params:
- segments:
- "{{ room }}"
repeat: 2
target:
entity_id: vacuum.rumen
- service: input_boolean.turn_on
data: {}
target:
entity_id: "{{ 'input_boolean.rumen_mopping_' + room }}"
- service: input_text.set_value
data:
value: "{{ room }}"
target:
entity_id: input_text.rumen_last_room
- conditions:
- condition: template
value_template: "{{ mode == 'Vacuum' }}"
sequence:
- device_id: <YOUR DEVICE ID>
domain: select
entity_id: select.rumen_mop_intensity
type: select_option
option: "off"
- service: vacuum.set_fan_speed
data:
fan_speed: max
target:
entity_id: vacuum.rumen
- service: vacuum.send_command
data:
command: app_segment_clean
params:
- segments:
- "{{ room }}"
repeat: 1
target:
entity_id: vacuum.rumen
- service: input_boolean.turn_on
data: {}
target:
entity_id: "{{ 'input_boolean.rumen_vacuuming_' + room }}"
- service: input_text.set_value
data:
value: "{{ room }}"
target:
entity_id: input_text.rumen_last_room
- wait_for_trigger:
- platform: state
entity_id:
- sensor.rumen_status
to: idle
- platform: state
entity_id:
- sensor.rumen_status
to: returning_home
- platform: state
entity_id:
- sensor.rumen_status
to: charging
continue_on_timeout: false
mode: queued
max: 10
A basic explanation of this script is that when triggered it will do one of two things:
- If the vacuum is idle, charging, or returning home - it will instruct it to start cleaning a room.
- If the vacuum is in any other state - it will wait until it is in one of the above states and then trigger instruction.
What you need to change to get it running is to replace <YOUR DEVICE ID>
with your device ID and change the room
field values to be your room IDs. You can follow along with the Roborock integration documentation to get all the IDs.
HELPER BOOLEANS
I’ve added boolean helpers that turn on when a certain room is being cleaned so I can use them as UI triggers. If you want to do the same, you would 2 boolean helpers for every room. Mine are named: input_boolean.rumen_<MODE>_<ROOM>
where the mode is vacuuming
or mopping
, based on which mode I’ve selected when calling the script.
If you don’t want to use them, you can remove all the input_boolean.turn_off
and input_boolean.turn_on
from the script.
If you will be using them, you will also need another automation that turns them off when cleaning is complete:
alias: "Rumen: Done Cleaning"
description: ""
trigger:
- platform: device
device_id: 851842ef42182631f9c2e6bc43cb2377
domain: vacuum
entity_id: 8602935513713fbf2fde95a748491121
type: docked
- type: not_running
platform: device
device_id: 851842ef42182631f9c2e6bc43cb2377
entity_id: eb7b7ee50ed14dddb67cfcfae4146f58
domain: binary_sensor
condition: []
action:
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.rumen_mopping_16
- input_boolean.rumen_mopping_17
- input_boolean.rumen_mopping_18
- input_boolean.rumen_mopping_19
- input_boolean.rumen_mopping_20
- input_boolean.rumen_vacuuming_16
- input_boolean.rumen_vacuuming_17
- input_boolean.rumen_vacuuming_18
- input_boolean.rumen_vacuuming_19
- input_boolean.rumen_vacuuming_20
data: {}
mode: single
UI TRIGGER CONFIGURATION
For my dashboard, I am using the Room Card, but it should be a similar setup for anything else. Here’s how my buttons are configured:
- entities:
- entity: input_boolean.rumen_vacuuming_16
name: Vacuum
state_color: true
icon: mdi:robot-vacuum
show_icon: true
tap_action:
action: call-service
service: script.clean_room
service_data:
mode: Vacuum
room: '16'
data:
skip_condition: true
double_tap_action:
action: none
- entity: input_boolean.rumen_mopping_16
name: Mop
state_color: true
icon: mdi:robot-vacuum-variant
show_icon: true
tap_action:
action: call-service
service: script.clean_room
service_data:
mode: Mop
room: '16'
data:
skip_condition: true
double_tap_action:
action: none
What is important here is to pass the correct parameters to the script so it does what you want it to do in the correct room.
The entity is my boolean helper for the corresponding room and action. If you are using the helpers, this will change the color according to the state of the helpers. For example, it is currently vacuuming the kitchen:

PHYSICAL BUTTONS CONFIGURAION
I’ve got some Philips Hue switches that I use for a bunch of stuff, including calling the vacuum to a room. Here’s how I’ve got that set up:
description: "Vacuum Bedroom"
mode: single
trigger:
- device_id: e9da518ea8f888c6d4a20883e79751c9
domain: hue
platform: device
type: repeat
subtype: 4
unique_id: 87922b93-6313-4bb5-aee8-b16e047cc836
condition: []
action:
- service: script.clean_room
metadata: {}
data:
mode: Vacuum
room: "18"
ADDITIONAL NOTES
I’ve set up the fields for the script to be dropdowns, this way it will be easier when creating an automation in the visual editor:
The cleaning script is in queue
mode with a maximum queue length of 10, I use this to queue my whole-house cleaning. It might be what you’re looking for with the multiple-room cleaning. I’m not sure if there is a way to see or modify the queue, I usually spam the return to dock button to clear the queue.