In this guide, I’ll show you everything you need to do to create a Vacuum Control Card in Home Assistant to view or control your robot vacuum and mop. For reference, I am using a Roborock S7 so if you use a different model, some of the options may not work for you (such as the Xiaomi Map Card).
Full YAML of the card is at the end of this post.
- Sonic Mopping Technology. Roborock S7 robot vacuum mops with the power of sound, scrubbing up to 3,000 times per minute. Fed by a 300 ml electronic water tank, stains from coffee to mud and more can...
- Intelligent Mop Lifting. S7’s VibraRise mop lifts when a carpet is detected, so you can mop hard floors and vacuum carpets in a single clean. It also raises when cleaning is finished to avoid...
Reference Links:

You will need to download the following integrations from the HACS store:
- Vacuum-Card: https://github.com/denysdovhan/vacuum-card
- Custom–Button card: https://github.com/custom-cards/button-card
- Lovelace Mushroom: https://github.com/piitaya/lovelace-mushroom
- Xiaomi Map Card: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card
Also, I have a 5-part Roborock S7 series you can read through starting here.
Prerequisites:
Before you get started, you’ll need to have gotten the coordinates of each room and put those into a script. Step 3 of Part 2 guide. This will create individual room scripts like script.vacuum_office
, script.vacuum_front_entry
.
Then, add those rooms to an input_select
helper. Step 7 of Part 2 guide.
Next, create an automation to call each script when triggered from the input select. See Step 9 of Part 2 guide.
Finally, you’ll want to create a toggle Helper called Map Mode Enabled (input_boolean.map_mode_enabled
). This is used for toggling the map on and off from the yellow map button.
The same procedure can be followed for mop control. Follow Part 4 for controlling your mop in Home Assistant.
Full Card YAML
You can either paste this into a Manual card, or add a Vertical Stack card. Replace your entity name, script name, input_select names, input_boolean name, and automation names if yours as different than mine.
- The animated card is the Vacuum-Card. I tweaked the card config to show if the mop is attached (so I know NOT to run the mop if it isn’t) and to show the total clean count (both sensors were created when I integrated my Roborock S7.)
- The 6 buttons below it are custom buttons using button-card that launch scripts or automations.
- The room picker/Schedule buttons are Mushroom Entity cards.
type: vertical-stack
cards:
- type: custom:vacuum-card
entity: vacuum.roborock_vacuum_a15
actions:
start:
service: automation.trigger
service_data:
entity_id: automation.run_vacuum_zone
stats:
default:
- entity_id: sensor.roborock_vacuum_a15_total_clean_count
unit: times
subtitle: Cleaning Count
- entity_id: binary_sensor.roborock_vacuum_a15_mop_attached
unit: null
subtitle: Mop Attached
cleaning:
- attribute: cleaned_area
unit: m2
subtitle: Cleaning area
- attribute: cleaning_time
unit: minutes
subtitle: Cleaning time
compact_view: false
show_status: true
show_name: true
show_toolbar: false
- type: horizontal-stack
cards:
- type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(57, 247, 126)
- value: 'on'
color: rgb(39, 176, 89)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.run_vacuum_zone
entity: automation.run_vacuum_zone
show_name: false
icon: mdi:robot-vacuum-variant
- type: custom:button-card
entity: script.stop_vacuum
tap_action:
action: toggle
show_name: false
state:
- value: 'off'
color: rgb(158, 54, 52)
- value: 'on'
color: rgb(232, 68, 65)
- type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(53, 213, 242)
- value: 'on'
color: rgb(40, 162, 184)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.run_mop_zone
entity: automation.run_mop_zone
show_name: false
icon: mdi:water-circle
- type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(196, 97, 55)
- value: 'on'
color: rgb(245, 123, 71)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.reset_vacuum_turn_off_mop_and_turn_to_max
entity: automation.reset_vacuum_turn_off_mop_and_turn_to_max
show_name: false
icon: mdi:reload
- type: custom:button-card
entity: input_boolean.map_mode_enabled
icon: mdi:map-check
state:
- value: 'off'
color: rgb(179, 179, 45)
- value: 'on'
color: rgb(250, 250, 62)
tap_action:
action: toggle
show_name: false
- type: custom:button-card
entity: script.vacuum_return_to_dock
icon: mdi:home-import-outline
state:
- value: 'off'
color: rgb(168, 32, 145)
- value: 'on'
color: rgb(204, 39, 176)
tap_action:
action: toggle
show_name: false
- type: conditional
conditions:
- entity: input_boolean.map_mode_enabled
state: 'on'
card:
square: false
columns: 1
type: grid
cards:
- type: conditional
conditions:
- entity: input_boolean.map_mode_enabled
state: 'on'
card:
square: false
columns: 1
type: grid
cards:
- type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_vacuum_a15
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
vacuum_platform: default
title: Vacuum Map
map_modes:
- template: vacuum_clean_zone_predefined
predefined_selections:
- zones:
- - 22023
- 23769
- 26332
- 27671
label:
text: Office
x: 24012
'y': 25523
- zones:
- - 26285
- 22065
- 29741
- 27577
label:
text: Dining
x: 27942
'y': 25807
- zones:
- - 23348
- 21970
- 29741
- 23694
label:
text: Entry
x: 25064
'y': 22818
- zones:
- - 29609
- 17748
- 34877
- 24460
label:
text: Kitchen
x: 32610
'y': 20599
- zones:
- - 22639
- 18525
- 27137
- 22142
label:
text: Son
x: 25196
'y': 20645
- zones:
- - 26096
- 12889
- 31115
- 22283
label:
text: Game Rm
x: 27564
'y': 14536
- zones:
- - 33519
- 12983
- 37544
- 18069
label:
text: Breakfast
x: 35716
'y': 16375
- zones:
- - 29619
- 24237
- 35414
- 27721
label:
text: Master Bath
x: 32470
'y': 25187
- zones:
- - 34856
- 17293
- 40205
- 23041
label:
text: Living Rm
x: 36751
'y': 20361
- zones:
- - 35318
- 23003
- 39880
- 27840
label:
text: Master Bed Rm
x: 37675
'y': 24509
- zones:
- - 29619
- 12841
- 32889
- 16913
label:
text: Daughter
x: 31166
'y': 15698
- template: vacuum_goto_predefined
predefined_selections:
- position:
- 37651
- 18940
icon:
name: mdi:trash-can
x: 37651
'y': 18940
- position:
- 33531
- 19508
icon:
name: mdi:water
x: 33531
'y': 19508
- template: vacuum_clean_zone
- template: vacuum_goto
- template: vacuum_follow_path
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: input_select.vacuum_rooms
layout: vertical
use_entity_picture: false
hide_icon: false
name: Vac Room Picker
icon: mdi:robot-vacuum-variant
icon_color: green
- type: custom:mushroom-entity-card
entity: input_select.mop_rooms
layout: vertical
name: Mop Room Picker
hide_icon: false
icon: mdi:water
icon_color: cyan
- type: custom:mushroom-entity-card
entity: input_boolean.schedule
layout: vertical
fill_container: false
hide_icon: false
name: Schedule
tap_action:
action: toggle
Row 1: Vacuum-Card
type: custom:vacuum-card
entity: vacuum.roborock_vacuum_a15
image: default
actions:
start:
service: automation.trigger
service_data:
entity_id: automation.run_vacuum_zone
stats:
default:
- entity_id: sensor.roborock_vacuum_a15_total_clean_count
unit: times
subtitle: Cleaning Count
- entity_id: binary_sensor.roborock_vacuum_a15_mop_attached
unit: null
subtitle: Mop Attached
cleaning:
- attribute: cleaned_area
unit: m2
subtitle: Cleaning area
- attribute: cleaning_time
unit: minutes
subtitle: Cleaning time
compact_view: false
show_status: true
show_name: true
show_toolbar: false
Row 2: Buttons
Custom-Button: Vacuum Zone (Selected from Input Select/Room Picker)
type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(57, 247, 126)
- value: 'on'
color: rgb(39, 176, 89)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.run_vacuum_zone
entity: automation.run_vacuum_zone
show_name: false
icon: mdi:water-circle
Custom-Button: Stop Vacuum
type: custom:button-card
entity: script.stop_vacuum
tap_action:
action: toggle
show_name: false
state:
- value: 'off'
color: rgb(158, 54, 52)
- value: 'on'
color: rgb(232, 68, 65)
Custom-Button: Mop Zone (Selected from Input Select/Room Picker)
type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(53, 213, 242)
- value: 'on'
color: rgb(40, 162, 184)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.run_mop_zone
entity: automation.run_mop_zone
show_name: false
icon: mdi:water-circle
Custom-Button: Reset to Vacuum Mode
If you have a mop, running this script will turn the mopping feature off, set the scrub intensity to none, and set the suction power to Turbo.
type: custom:button-card
styles: null
state:
- value: 'off'
color: rgb(196, 97, 55)
- value: 'on'
color: rgb(245, 123, 71)
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.reset_vacuum_turn_off_mop_and_turn_to_max
entity: automation.reset_vacuum_turn_off_mop_and_turn_to_max
show_name: false
icon: mdi:reload
Custom-Button: Map Mode Enabled
This sets the color of the on/off state.
type: custom:button-card
entity: input_boolean.map_mode_enabled
icon: mdi:map-check
state:
- value: 'off'
color: rgb(179, 179, 45)
- value: 'on'
color: rgb(250, 250, 62)
tap_action:
action: toggle
show_name: false
Custom-Button: Return to Dock
type: custom:button-card
entity: script.vacuum_return_to_dock
icon: mdi:home-import-outline
state:
- value: 'off'
color: rgb(168, 32, 145)
- value: 'on'
color: rgb(204, 39, 176)
tap_action:
action: toggle
show_name: false
Row 3: Room Pickers & Schedule Buttons
Assuming you’ve already created an input-select boolean from the Helpers tab, you can add this as an entity (input_select.vacuums_rooms and input_select.mop_rooms). I used a Mushroom Entity card for these two.
The Schedule button is just a toggle helper (input_boolean.schedule). If this is off, then the automatic vacuum automations I have won’t run. This is super useful is I decide not to run the vacuum on a certain day or time. For example, if I normall have this run at 6pm but we have company over, I can just toggle this off to prevent it from running. I added a condition to my scheduled cleaning automations that basically says “if input_boolean.schedule is OFF, do not run”.
Row 4: Conditional
This is optional, but I added a conditional card that displays the map of my house. Under Conditions, set the state equal to “on”. Under Card, paste the entire YAML for your Xiaomi Map Card into a Manual card.
My reasoning behind this is that I don’t need to see the map everytime I open the app; I’d rather just see the map if I toggle the yellow map button.

Wrapping Up
Hopefully you have all the info you need to create your own simple & clean dashboard for your robotic vacuums! I know there is a ton of info here and in the previous 5 guides, but hopefully you’ll be able to set everything up if you follow this.
As always if you have any questions just leave me a comment below and I’ll do my best to help you out.
My Favorite Home Assistant Devices
Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.
- Zwave/Zigbee hub: Nortek GoControl HUSBZB-1
- Smart Plugs: Sonoff S31 Lite Zigbee
- Motion Sensors: Hue Indoor Motion
- Outdoor Camera: Amcrest IP5M Turret
- Robot Vacuum: Roborock S7
The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.
Can you make a short screencast of how it looks/works when using it? Specifically I’m interested in how the room selection works when clicking on it (but I suspect a quick 10 second run-through would be interesting).
Thanks for the all the detailed articles 🙂
Amazing articles! Best that I’ve found. Thank you!
You’re welcome!
Great guide but I felt like a lot of your scripts and automations were unnecessary. I tried following your guide from start to finish but soon became overwhelmed by the amount of new scripts and automations. Scripts like stopping or sending back to base were functions that are already available through the vacuum or map card. The zone cleaning through input selects seemed like a step back from the camera map card. The other ones like setting vacuum and mop mode/routes are done just as easily through regular service calls.
The thing I was missing most was an easy way to see/set vacuum/mop modes so I ended up making three rows of buttons using the button card- vacuum, mop mode, mop route. It has every option laid out in a similar UI to the native app with just service calls sending commands directly without any scripts. Currently selected settings are all highlighted and visible simultaneously through state attribute readings. (spent way too much time trying to find the right code for this part to work)
There’s also a new Roborock integration through HACS that allows you to keep using the Roborock app while keeping all the Home Assistant features. I believe it supports the S7 Max V natively as I saw new options for the Max+ vacuum settings as well as a better map that shows the carpet texture.
Hello Lazylife,
do you mind sharing how you did the card- vacuum, mop mode, mop route buttons?
Thanks!
is it just me, but except for this page and the page(s) linked here, I just get blank screens