Roborock: Allow cleaning modes to be selected (Vac followed by Mop, Vac & Mop, Mop, Vacuum) #3998
Replies: 8 comments
|
🏷️ I've automatically added the |
|
I'd also love to use this feature in Home Assistant instead of the Roborock App. I have a Roborock Saros 10R and in the App it looks as in the screenshot above. |
|
Same request here, on a Roborock Qrevo Curv 2 Pro ( The field is
|
|
I have the Saros20. I can confirm, when trying to build around the cleaning mode select absence with automations to set for example vacuum fan speed to off(brush lifted) to create a mop only job, it says Error while calling SET_CUSTOM_MODE. Also when the smartplan mode is selected, it changes to it, but you can not change it back again to another mode after that, you have to first switch it back in the app and then the select entity works again. Error SET_MOP_MODE When in app set to mop only the vacuum entity fan speeds status changes to "null" this is not listed as an option |
|
I ran into this thread while building a dashboard in Home Assistant to control my Roborock from HA instead of the app. Neither I nor Claude could get the robot to vacuum a room and then mop it. @rutterkamp's writeup saved me a lot of debugging, and I think I found the setter he was missing.
Device: Roborock Saros 20 Sonic ( Reading the table
action: logger.set_level
data:
roborock: debugaction: vacuum.send_command
target:
entity_id: vacuum.saros_20_sonic
data:
command: get_customize_clean_modeThen open Set the level back to Writing it back with
|
seq_type |
time | area covered | coverage |
|---|---|---|---|
| 0 | 4.55 min | 5.8 m² | 1.00x |
| 1 | 9.05 min | 11.5 m² | 1.98x |
So the flag changes what the robot does, and the room gets covered twice. One difference from the Qrevo: on the Saros 20 both passes happen in a single outing, the robot does not dock and wash the mop in between, and HA's status stays segment_cleaning the whole time. It looks like the sequencing is per room here rather than per house.
set_clean_sequence is not related to this, by the way. It returns [] on my device and looks like room order.
The whole thing, as it runs here
This is what the dashboard actually calls, in case it saves someone the assembly work. Entity names and the option labels are translated from Danish, otherwise it is the running script.
The helpers behind it: one input_boolean.clean_<room> per room for picking rooms, one input_select.clean_<room>_suction and _water per room, a clean_mode select with Vacuum only / Vacuum + mop / Vacuum, mop afterwards, a global clean_mop_route select, and two master overrides clean_suction / clean_water whose first option is Room decides.
The script builds the full eight-room table from those helpers, so the rooms that are not part of this run are still sent, with their own settings and seq_type: 0. That is not optional, since the write replaces the table.
clean_start:
alias: Cleaning - start
mode: single
variables:
vacuum_entity: vacuum.saros_20_sonic
# slug, segment id, clean_area id, mop_power (robot's own, not on the dashboard)
room_meta: >-
{{ [
['hall', 1, 'hall', 1],
['kids_room', 2, 'kids_room', 2],
['dining', 3, 'dining', 3],
['living', 4, 'tv_corner', 1],
['kitchen', 5, 'kitchen', 3],
['entrance', 6, 'entrance', 1],
['bathroom', 7, 'bathroom', 3],
['bedroom', 8, 'bedroom', 2]
] }}
fan_map: "{{ {'Quiet': 101, 'Balanced': 102, 'Turbo': 103, 'Max': 104, 'Max+': 108} }}"
water_map: >-
{{ {'Very light': 221, 'Light': 225, 'Medium': 235,
'Moderate': 245, 'High': 248, 'Extreme': 250} }}
vacuum_only: "{{ states('input_select.clean_mode') == 'Vacuum only' }}"
mop_after: "{{ states('input_select.clean_mode') == 'Vacuum, mop afterwards' }}"
master_fan: "{{ states('input_select.clean_suction') }}"
master_water: "{{ states('input_select.clean_water') }}"
route_code: >-
{{ {'Standard': 300, 'Deep+': 303, 'Fast': 304}
.get(states('input_select.clean_mop_route'), 300) }}
rooms: >-
{% set ns = namespace(r=[]) %}
{% for slug, seg, area, mp in room_meta %}
{% if is_state('input_boolean.clean_' ~ slug, 'on') %}
{% set ns.r = ns.r + [area] %}
{% endif %}
{% endfor %}
{{ ns.r }}
room_table: >-
{% set ns = namespace(out=[]) %}
{% for slug, seg, area, mp in room_meta %}
{% set picked = is_state('input_boolean.clean_' ~ slug, 'on') %}
{% set fan_choice = states('input_select.clean_' ~ slug ~ '_suction')
if master_fan == 'Room decides' else master_fan %}
{% set water_choice = states('input_select.clean_' ~ slug ~ '_water')
if master_water == 'Room decides' else master_water %}
{% set fan_raw = fan_map.get(fan_choice, 102) %}
{% set water = 200 if (picked and vacuum_only)
else water_map.get(water_choice, 235) %}
{% set fan = 104 if (water > 200 and fan_raw == 108) else fan_raw %}
{% set ns.out = ns.out + [{
'segment': seg,
'fan_power': fan,
'water_box_mode': water,
'mop_mode': route_code,
'repeat': 1,
'seq_type': (1 if (picked and mop_after) else 0),
'mop_power': mp}] %}
{% endfor %}
{{ ns.out }}
sequence:
- condition: template
value_template: "{{ rooms | count > 0 }}"
- alias: Write per-room strengths and mop order to the robot
action: vacuum.send_command
target:
entity_id: "{{ vacuum_entity }}"
data:
command: set_customize_clean_mode
params: "{{ room_table }}"
- delay: "00:00:02"
- alias: Put the robot in custom mode so it uses the per-room table
action: vacuum.send_command
target:
entity_id: "{{ vacuum_entity }}"
data:
command: set_clean_motor_mode
params:
- "{{ {'fan_power': 106, 'water_box_mode': 204, 'mop_mode': 302} }}"
- delay: "00:00:05"
- action: vacuum.clean_area
target:
entity_id: "{{ vacuum_entity }}"
data:
cleaning_area_id: "{{ rooms }}"
- alias: Confirm it actually started
wait_template: "{{ is_state(vacuum_entity, 'cleaning') }}"
timeout: "00:03:00"
continue_on_timeout: falseThree notes on why it looks like that. Vacuum only is water 200 rather than a different mode, because water off is the one thing the device never rejects. Max+ is clamped to Max in any room that gets water, or the whole table write fails. And the last step exists because a rejected command is a silent no-op: without the wait_template a failed run looks identical to a successful one from the dashboard.
The whole dashboard is built over the HA REST and websocket API, so all of this is entities and a script, no custom component.
@egaldg, on the Saros 20
Same picture here. set_custom_mode, set_water_box_custom_mode and set_mop_mode, which are the commands behind HA's fan speed and mop mode selects, all fail with -10005 param error! on this model, which is why fan speed reads custom and mop intensity reads unknown. set_clean_motor_mode works instead. Values accepted here: fan 101/102/103/104/108 (+106 custom), water 200/201/202/203 and 221/225/230/235/240/245/248/250 (+204 custom), route 300/303/304 (+302 custom). Mop-only is reachable with fan 105, but only with water on: 105/235/300 works, 105/200/300 is rejected.
Your "cannot change it back" symptom has a workaround. While the robot sits in the custom triple, any call with water on is rejected with -10005. Send {fan_power: 102, water_box_mode: 200, mop_mode: 300} first, water off, which is always accepted, and then the real values. Back to back with no delay is fine. That was also a silent failure in my own script: it aborted halfway and never reached vacuum.clean_area, with the error only visible in home-assistant.log.
|
I have 2 files of value, i am not sure anymore where i did found these but they were very helpfull to me. |
|
up |
|
Same request here. I have a Roborock Saros 20 Neo and the "Vacuum, then mop" cleaning mode from the Roborock app is not available in Home Assistant. I would really like to see this exposed in the integration, either as an option in the cleaning mode entity or as a separate select/service, so it can be used in automations and scripts. Home Assistant version: 2026.11.1 Thanks to everyone who already did the protocol research here. Happy to test changes or provide diagnostics for the Saros 20 Neo if that helps. |
Uh oh!
There was an error while loading. Please reload this page.
Integration name
Roborock
Link to integration documentation on our website
https://www.home-assistant.io/integrations/roborock/
Describe the enhancement
I have a Roborock Qrevo C (reports as roborock.vacuum.a170 in the core Roborock integration), and I cannot seem to specify the cleaning mode when triggering the vacuum via HA.
The robot supports four cleaning modes via the native app: Mop, Vacuum, Vac & Mop and Vac followed by Mop - but none of these mode options seem to be exposed anywhere in the HA integration, and it always defaults to Mop when triggered by the Clean area with vacuum cleaner action.
Use cases
My living room has hardwood floors with a large rug around the coffee table, so although the robot is cleaning the majority of the room, because it is being triggered in mop mode by default it always ignores the rug (plus is not actually actively vacuuming the floor), so after it finishes I have to manually tell it to do that separately via the Roborock app.
I would like the ability to set these modes via HA, so that my automations can trigger the robot to clean the room correctly
Anything else?
Example of the settings I am referring to in the Roborock app:
All reactions