Last year I created a really cool compact vacuum and mop card. It used a lot of custom:button-card
, but since I’ve switched my dashboards over to Mushroom, I wanted to update this card as well.
Here’s what I came up with.
Prerequisites
First, you need to grab the coordinates of each room and put those into a script. I have a more detailed guide on how I did that here. The coordinates can be found from the Xiaomi Map Card. The “vacuum individual room” scripts will look like this for vacuuming:
alias: "Vacuum: Office"
sequence:
- service: xiaomi_miio.vacuum_clean_zone
target:
entity_id: vacuum.roborock_vacuum_a15
data:
repeats: 1
zone:
- - 22023
- 23769
- 26332
- 27671
mode: single
icon: mdi:desktop-classic
And like this for mopping:
alias: Mop Office
sequence:
- service: xiaomi_miio.vacuum_remote_control_stop
target:
entity_id: vacuum.roborock_vacuum_a15
data: {}
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: script.set_mopping_route
target:
entity_id: vacuum.roborock_vacuum_a15
data:
route: deep
- service: xiaomi_miio.vacuum_clean_zone
target:
entity_id: vacuum.roborock_vacuum_a15
data:
repeats: 1
zone:
- - 22023
- 23769
- 26332
- 27671
mode: single
icon: mdi:robot-vacuum
For mopping, you will also need to create a script that sets the “mopping route”. Basically configuring the vacuum for standard or deep cleaning. The script.set_mopping_route
looks like this:
alias: Set Roborock mopping route
fields:
route:
description: "Mopping route - can be: standard | deep"
example: standard
sequence:
- alias: Config variables
variables:
config_mopping_route:
standard: 300
deep: 301
mopping_route: "{{ config_mopping_route[route]}}"
- choose:
- alias: Invalid mopping route value
conditions:
- condition: template
value_template: "{{ route not in config_mopping_route|list }}"
sequence:
- service: system_log.write
data:
message: >-
Invalid mopping_route value '{{ route }}'. Valid values are {{
config_mopping_route|list|join(', ') }}
level: warning
logger: roborock
default:
- alias: Set mopping route
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_mop_mode
params: "[{{ mopping_route }}]"
mode: single
Repeat the script creating process for every room in your house, and then do the same for rooms that can be mopped. Once done, you should have scripts like this – one for vacuuming a room and one for mopping a room.
- script.vacuum_office
- script.mop_office
- script.vacuum_kitchen
- script.mop_kitchen
- etc.
Home Assistant integrations needed
Once you have your scripts created, you can begin working on your card. First, you’ll need to have the following integrations installed from HACS:
Then, paste the code below into a Manual card on one of your dashboards and change out the entities and script names.
Note: Not everything will be working yet; you’ll still need to create a few helpers from the Helpers menu. More info after the YAML.
- x4 input_booleans (Settings > Devices & Services > Helpers > Toggle)
- x2 input_selects (Settings > Devices & Services > Helpers > Dropdown)
FULL YAML
type: vertical-stack
cards:
- square: false
columns: 1
type: custom:vacuum-card
entity: vacuum.roborock_vacuum_a15
actions:
start:
service: automation.trigger
service_data:
entity_id: automation.run_vacuum_zone
cards:
- type: custom:vacuum-card
entity: vacuum.roborock_vacuum_a15
image: default
show_toolbar: false
show_toolbar: false
- type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
entity: script.start_vacuuming_all_rooms_or_pause
icon: mdi:play
icon_color: green
badge_icon: >-
{{ 'mdi:robot-vacuum' if
is_state('vacuum.roborock_vacuum_a15', 'cleaning') }}
badge_color: >-
{{ 'green' if
is_state('vacuum.roborock_vacuum_a15','cleaning') }}
tap_action:
action: toggle
layout: horizontal
- type: custom:mushroom-template-card
entity: script.stop_vacuum
icon: mdi:stop
icon_color: red
badge_icon: '{{ ''mdi:reload'' if is_state(''script.stop_vacuum'', ''on'') }}'
badge_color: '{{ ''black'' if is_state(''script.stop_vacuum'',''on'') }}'
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_return_to_dock
badge_icon: >-
{{ 'mdi:reload' if is_state('vacuum.roborock_vacuum_a15',
'returning') }}
badge_color: >-
{{ 'red' if
is_state('vacuum.roborock_vacuum_a15','returning') }}
icon: mdi:home
icon_color: light-blue
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: input_boolean.map_mode_enabled
icon: mdi:map-check
icon_color: orange
badge_icon: >-
{{ 'mdi:arrow-up-bold' if
is_state('input_boolean.map_mode_enabled', 'on') else
'mdi:arrow-down-bold' }}
badge_color: >-
{{ 'red' if is_state('input_boolean.map_mode_enabled',
'on') else 'green' }}
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: input_boolean.vac_info
icon: mdi:information
icon_color: lime
badge_icon: >-
{{ 'mdi:arrow-up-bold' if
is_state('input_boolean.vac_info', 'on') else
'mdi:arrow-down-bold' }}
badge_color: |-
{{ 'red' if is_state('input_boolean.vac_info', 'on') else
'green' }}
layout: horizontal
tap_action:
action: toggle
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: input_boolean.vac_controls
badge_icon: >-
{{ 'mdi:arrow-up-bold' if is_state('input_boolean.vac_info', 'on')
else 'mdi:arrow-down-bold' }}
tap_action:
action: toggle
- type: custom:mushroom-entity-card
entity: input_boolean.mop_controls
tap_action:
action: toggle
- type: conditional
conditions:
- entity: sensor.rosie_mop_attached_status
state: 'yes'
- entity: vacuum.roborock_vacuum_a15
state: cleaning
- entity: vacuum.roborock_vacuum_a15
state_not: idle
card:
type: custom:mushroom-template-card
primary: 'Currently mopping:'
secondary: '{{ states(''input_select.mop_rooms'') }}'
icon: mdi:timer-sand
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: more-info
badge_color: ''
icon_color: blue
badge_icon: mdi:ab-testing
- type: conditional
conditions:
- entity: sensor.rosie_mop_attached_status
state: 'no'
- entity: vacuum.roborock_vacuum_a15
state: cleaning
- entity: vacuum.roborock_vacuum_a15
state_not: idle
card:
type: custom:mushroom-template-card
primary: 'Currently vacuuming:'
secondary: '{{ states(''input_select.vacuum_rooms'') }}'
icon: mdi:timer-sand
badge_icon: ''
icon_color: blue
- type: conditional
conditions:
- entity: input_boolean.vac_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
entity: script.vacuum_front_entry
secondary: Entry
icon: mdi:door
icon_color: light-green
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_office
secondary: Office
icon: mdi:office-building
icon_color: light-green
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
primary: ''
secondary: Gameroom
icon: mdi:sony-playstation
tap_action:
action: toggle
layout: horizontal
entity: script.vacuum_game_room
icon_color: light-green
double_tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.vac_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Dining
icon: mdi:food
tap_action:
action: toggle
layout: horizontal
entity: script.vacuum_dining_room
icon_color: green
double_tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_kitchen
secondary: Kitchen
icon: mdi:faucet-variant
icon_color: green
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_breakfast_room
secondary: Breakfast
icon: mdi:door
icon_color: green
layout: horizontal
tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.vac_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Master
icon: mdi:bed
tap_action:
action: toggle
layout: horizontal
entity: script.vacuum_master_bedroom
icon_color: teal
double_tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_son
secondary: Son
icon: mdi:bed
icon_color: teal
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.vacuum_daughter
secondary: Daughter
icon: mdi:bed
icon_color: teal
layout: horizontal
tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.vac_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Master Bath
icon: mdi:shower
tap_action:
action: toggle
layout: vertical
entity: script.vacuum_master_bathroom
icon_color: cyan
- type: custom:mushroom-template-card
secondary: Mop to Vacuum Mode
icon: mdi:filter-cog
icon_color: pink
layout: vertical
tap_action:
action: call-service
service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.reset_vacuum_turn_off_mop_and_turn_to_max
entity: automation.reset_vacuum_turn_off_mop_and_turn_to_max
- type: conditional
conditions:
- entity: input_boolean.mop_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Entry
icon: mdi:door
tap_action:
action: toggle
layout: horizontal
entity: script.mop_entryway
icon_color: light-green
double_tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.mop_office
secondary: Office
icon: mdi:office-building-outline
icon_color: light-green
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.mop_game_room
secondary: Gameroom
icon: mdi:sony-playstation
icon_color: light-green
layout: horizontal
tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.mop_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Dining
icon: mdi:food-fork-drink
tap_action:
action: toggle
layout: horizontal
entity: script.mop_dining_room
icon_color: green
double_tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.mop_kitchen
secondary: Kitchen
icon: mdi:faucet-variant
icon_color: green
layout: horizontal
tap_action:
action: toggle
- type: custom:mushroom-template-card
entity: script.mop_breakfast_room
secondary: Breakfast
icon: mdi:spoon-sugar
icon_color: green
layout: horizontal
tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.mop_controls
state: 'on'
card:
type: horizontal-stack
cards:
- type: horizontal-stack
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
margin: '-4px -4px -8px -4px'
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
border_radius: true
margin: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: Master
icon: mdi:shower
tap_action:
action: toggle
layout: vertical
entity: script.mop_master_bath
icon_color: teal
double_tap_action:
action: toggle
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-template-card
primary: Rosie Battery Level
secondary: '{{ state_attr(''vacuum.roborock_vacuum_a15'',''battery_level'') }}%'
icon: mdi:battery-30
icon_color: lime
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-entity-card
entity: sensor.rosie_mop_attached_status
name: Mop attached
icon: mdi:pail
icon_color: lime
tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-entity-card
entity: sensor.roborock_vacuum_a15_total_clean_count
name: Cleaning Count
icon: mdi:clock-alert
icon_color: lime
tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-entity-card
entity: sensor.rosie_clean_area_friendly
value_template: '{{ (value | float(0) * 10.76) | round(1) }}'
name: Cleaned area (sq ft)
icon_color: lime
icon: mdi:format-text-wrapping-overflow
tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-entity-card
entity: sensor.rosie_last_clean_end_friendly
name: Last Cleaning Time
icon: mdi:clock-alert
icon_color: lime
tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: custom:mushroom-entity-card
entity: sensor.roborock_vacuum_a15_current_clean_duration
name: Last Cleaning Duration
icon: mdi:clock-alert
icon_color: lime
tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.vac_info
state: 'on'
card:
type: logbook
entities:
- script.vacuum_return_to_dock
- script.vacuum_front_entry
- script.vacuum_daughter
- script.vacuum_son
- script.vacuum_office
- script.vacuum_dining_room
- script.vacuum_breakfast_room
- script.vacuum_master_bathroom
- script.vacuum_master_bathroom
- script.vacuum_kitchen
- script.vacuum_game_room
- script.vacuum_living_room
- script.vacuum_trash_can
- script.vacuum_sink
- script.mop_breakfast_room
- script.mop_dining_room
- script.mop_entryway
- script.mop_game_room
- script.mop_kitchen
- script.mop_living_room
- script.mop_master_bath
- automation.reset_vacuum_turn_off_mop_and_turn_to_max
- 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
rotate: 180
background_color: green
map_locked: true
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
vacuum_platform: default
tiles: []
icons: []
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
Create 4 Input Boolean Helpers (Toggle)
Create 4 helpers for your vacuum – one called Vac Controls, one called Vac Info, one called Mop Controls, and one called Map Mode Enabled.
These will allow us to “toggle” when clicked to conditionally show rooms. (i.e. – if Vac Controls is clicked, show rooms to vacuum. Or when the Map is clicked, show the map.)
This gives you entites named:
- input_boolean.vac_info
- input_boolean.vac_controls
- input_boolean.mop_controls
- input_boolean.map_mode_enabled


These are what I use to conditionally display info when clicked.

Create 2 Input Selects
Next, create two input selects (dropdowns) from the Helpers menu. These input selects show the room name. You’ll create one for vacuuming and one for mopping.
I did this because I wanted a way to see which room is currently being vacuumed or mopped.
I then put input selects into a conditional card in the YAML above – if state of the vacuum is cleaning
and the mop is not attached, show the room being vacuumed conditional card. If the state is cleaning
and the mop is attached, then we can assume it’s mopping and not vacuuming and it should show the “Currently mopping:” conditional card.


Create Automation to Change Input Select When a Room is Clicked
Next, we need a way to change the input_select.
For example, when the Vacuum Controls > Office button is clicked, the dropdown should change to “Office”. When Mop Controls > Kitchen is clicked, change the input_select.mop_rooms dropdown to “Kitchen”.
This can be done through a a single automation using trigger ID’s.
alias: "Input Select: Currently Vacuumed or Mopped Rooms"
description: ""
trigger:
- platform: state
entity_id:
- script.vacuum_front_entry
from: "off"
to: "on"
id: frontentry
- platform: state
entity_id:
- script.vacuum_office
from: "off"
to: "on"
id: office
- platform: state
entity_id:
- script.vacuum_game_room
from: "off"
to: "on"
id: gameroom
- platform: state
entity_id:
- script.vacuum_dining_room
from: "off"
to: "on"
id: dining
- platform: state
entity_id:
- script.vacuum_kitchen
from: "off"
to: "on"
id: kitchen
- platform: state
entity_id:
- script.vacuum_breakfast_room
from: "off"
to: "on"
id: breakfast
- platform: state
entity_id:
- script.vacuum_master_bedroom
from: "off"
to: "on"
id: masterbedroom
- platform: state
entity_id:
- script.vacuum_son
from: "off"
to: "on"
id: son
- platform: state
entity_id:
- script.vacuum_daughter
from: "off"
to: "on"
id: daughter
- platform: state
entity_id:
- script.vacuum_master_bathroom
from: "off"
to: "on"
id: masterbath
- platform: state
entity_id:
- script.mop_entryway
from: "off"
to: "on"
id: mopfrontentry
- platform: state
entity_id:
- script.mop_office
from: "off"
to: "on"
id: mopoffice
- platform: state
entity_id:
- script.mop_game_room
from: "off"
to: "on"
id: mopgameroom
- platform: state
entity_id:
- script.mop_dining_room
from: "off"
to: "on"
id: mopdiningroom
- platform: state
entity_id:
- script.mop_kitchen
from: "off"
to: "on"
id: mopkitchen
- platform: state
entity_id:
- script.mop_breakfast_room
from: "off"
to: "on"
id: mopbreakfast
- platform: state
entity_id:
- script.mop_master_bath
from: "off"
to: "on"
id: mopmasterbathroom
- platform: state
entity_id:
- script.mop_master_bath
from: "off"
to: "on"
id: moplivingroom
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: frontentry
sequence:
- service: input_select.select_option
data:
option: Front Entry
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: office
sequence:
- service: input_select.select_option
data:
option: Office
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: gameroom
sequence:
- service: input_select.select_option
data:
option: Game Room
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: dining
sequence:
- service: input_select.select_option
data:
option: Dining Room
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: kitchen
sequence:
- service: input_select.select_option
data:
option: Kitchen
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: breakfast
sequence:
- service: input_select.select_option
data:
option: Breakfast Room
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: masterbedroom
sequence:
- service: input_select.select_option
data:
option: Master Bedroom
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: son
sequence:
- service: input_select.select_option
data:
option: Son
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: daughter
sequence:
- service: input_select.select_option
data:
option: daughter
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: masterbathroom
sequence:
- service: input_select.select_option
data:
option: Master Bathroom
target:
entity_id: input_select.vacuum_rooms
- conditions:
- condition: trigger
id: mopfrontentry
sequence:
- service: input_select.select_option
data:
option: Entry
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopoffice
sequence:
- service: input_select.select_option
data:
option: Office
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopgameroom
sequence:
- service: input_select.select_option
data:
option: Game Room
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopdiningroom
sequence:
- service: input_select.select_option
data:
option: Dining Room
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopkitchen
sequence:
- service: input_select.select_option
data:
option: Kitchen
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopbreakfast
sequence:
- service: input_select.select_option
data:
option: Breakfast Room
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: mopmasterbathroom
sequence:
- service: input_select.select_option
data:
option: Master Bathroom
target:
entity_id: input_select.mop_rooms
- conditions:
- condition: trigger
id: moplivingroom
sequence:
- service: input_select.select_option
data:
option: Living Room
target:
entity_id: input_select.mop_rooms
mode: single
Optional: Create Script to Reset from Mop Mode to Vacuum only
You’ll see in the yaml above that I have a button under Vac Controls called “Mop to Vacuum Mode”. When clicked, this runs an script to reset from mopping to vacuuming. I typically check if the mop is installed before I vacuum. If it is, I remove the mop head, run Mop to Vacuum Mode to reset the settings, and then pick a room.
I say this is optional because some of you might not have a combo vacuum/mop, but if you do, I recommended creating this automation.
Reason
It’s important to note that once you run your mop, it will stay in “deep” mopping mode, which means it won’t vacuum.
So, you can create another script that sets it back to “standard”. Whenever it switches from Deep to Standard, the last used “vacuum power” and “scrub intensity” will go back to whatever it was previously set to. For example, if the last time you vacuumed you had it set to “turbo” and Scrub Intensity was “intense”, running this script will go back to that, like this:
alias: "Reset Vacuum: Turn off Mop and Turn to Max"
description: ""
trigger: []
action:
- service: script.roborock_set_manual_mode
target:
entity_id: vacuum.roborock_vacuum_a15
data:
vacuum: max
mopping: "off"
- service: script.set_mopping_route
target:
entity_id: vacuum.roborock_vacuum_a15
data:
route: standard
This script runs two scripts – one is the “Set Roborock mopping route” under the Prerequisites section above which you should’ve already created, and the other is below.
alias: Set Roborock manual vacuum and mopping settings
fields:
vacuum:
description: "Vacuum mode - can be: silent | balanced | turbo | max"
example: max
mopping:
description: "Mopping mode - can be: off | low | medium | high"
example: "off"
sequence:
- alias: Config variables
variables:
config_vacuum:
silent: 101
balanced: 102
turbo: 103
max: 104
config_mopping:
"off": 200
low: 201
medium: 202
high: 203
vacuum_mode: "{{ config_vacuum[vacuum] }}"
mopping_mode: "{{ config_mopping[mopping] }}"
- choose:
- alias: Invalid vacuum value
conditions: "{{ vacuum not in config_vacuum|list }}"
sequence:
- service: system_log.write
data:
message: >-
Invalid vacuum value '{{ vacuum }}'. Valid values are {{
config_vacuum|list|join(', ') }}
level: warning
logger: roborock
- alias: Invalid mopping value
conditions: "{{ mopping not in config_mopping|list }}"
sequence:
- service: system_log.write
data:
message: >-
Invalid mopping value '{{ lavaggio }}'. Valid values are {{
config_mopping|list|join(', ') }}
level: warning
logger: roborock
default:
- alias: Set vacuum mode
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_custom_mode
params: "[{{ vacuum_mode }}]"
- alias: Set mopping mode
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_water_box_custom_mode
params: "[{{ mopping_mode }}]"
mode: single
Wrapping Up
I think that’s everything! There’s a few other noteworthy features I added to this card, such as Mushroom Card “Badges” that change icon & color when clicked, a filtered logback card that only shows when any of the vac/mop scripts are ran (sort of as a way to see a history of what was vacuumed last), and various vacuum sensors under the yellow Info button. The ability to pick a room from a button instead of using an input_select has been super helpful.
I would like come up with a way to see what rooms (scripts) were called within the last X minutes or days, but haven’t figured out the best way to do that yet. Suggestions welcome!
Hopefully this inspires you to update your Home Assistant vacuum dashboard!
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.