[![Ko-Fi][ko_fi_shield]][ko_fi]
[![buycoffee.to][buycoffee_to_shield]][buycoffee_to]
[![PayPal.Me][paypal_me_shield]][paypal_me]
[![Revolut.Me][revolut_me_shield]][revolut_me]
This card provides a user-friendly way to fully control map-based vacuums in Home Assistant. Supported brands include Xiaomi (Roborock/Viomi/Dreame/Roidmi/Valetudo/Valetudo RE), Neato, Wyze, Roomba, Ecovacs (and probably more).
https://user-images.githubusercontent.com/6118709/140251738-7fb06e81-34b0-4bf8-b7b1-2221d0062331.mp4
Features include:
yaml
url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js
type: modulexiaomi-vacuum-map-card.js file from
the latest release<ha config>/www/ directory,
e.g. /config/www/custom_lovelace/xiaomi-vacuum-map-card.jsyaml
url: /local/custom_lovelace/xiaomi-vacuum-map-card.js
type: modulewww directoryThis card contains UI configuration editor, but it is limited to only basic set of features. Its full potential can be achieved by manual yaml adjustments.
:warning::warning::warning:
You can use this configuration as an example: demo config (configuration used in full_demo.mp4).
:warning::warning::warning:
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
title |
string | no | empty | Card's title |
language |
string | no | autodetected | Overrides autodetected language (supported languages) |
action_handler_id |
string | no | - | Enables action handling |
additional_presets |
list | no | empty | A list of additional presets (e.g. with different map/vacuum) |
| All values from preset options section |
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
preset_name |
string | yes1 | - | Name of the preset |
entity |
string | yes | - | Vacuum entity |
map_source |
string | yes | - | Preset's map source |
calibration_source |
object | yes2 | - | Preset's calibration source |
vacuum_platform |
string | no | default |
Preset's vacuum platform |
map_locked |
boolean | no | false |
Default state of pan/zoom |
two_finger_pan |
string | no | false |
Enables two finger map panning |
icons |
list | no | autogenerated | Preset's icons |
append_icons |
boolean | no | false |
Enables appending configured icons to autogenerated ones instead of replacing them |
tiles |
list | no | autogenerated | Preset's tiles |
append_tiles |
boolean | no | false |
Enables appending configured tiles to autogenerated ones instead of replacing them |
map_modes |
list | no | autogenerated | Preset's map modes |
activate |
object | no | - | Service call that should be executed after clicking preset name |
activate_on_switch |
boolean | no | false |
Enables executing activate service call after switching map preset |
conditions |
list | no | - | List of conditions that need to be (all of them) met for preset to be shown |
clean_selection_on_start |
boolean | no | true |
Allows to disable cleaning selection on cleanup start |
internal_variables |
object | no | - | Allows to specify default values for internal variables |
1 If multiple presets are configured
2 Not mandatory when used with a platform that support a default calibration
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
camera |
string | no1 | - | Entity id of map camera |
image |
string | no1 | - | URL of map image |
crop |
object | no | no cropping | Images cropping options |
1 Exactly one of camera or image must be provided
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
top |
number | no | 0 | Image cropping value from the top (in pixels) |
bottom |
number | no | 0 | Image cropping value from the bottom (in pixels) |
left |
number | no | 0 | Image cropping value from the left (in pixels) |
right |
number | no | 0 | Image cropping value from the right (in pixels) |
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
camera |
boolean | no1 | - | Enables retrieving calibration from camera defined in map_source (Xiaomi Cloud Map Extractor) |
entity |
string | no1 | - | Entity with calibration returned as a state |
attribute |
string | no | - | Enables usage of a configured attribute instead of state of given entity |
calibration_points |
list | no1 | - | List of 3 or 4 calibration points |
identity |
boolean | no1 | - | Enables using image coordinates on map (e.g. when map is used just for rooms) |
platform |
string | no1 | - | Enables using a default calibration from a chosen platform (provided that it supports it) |
1 Exactly one of camera, entity, calibration_points, identity or platform must be provided
Each of calibration points must have a following structure:
vacuum: # coordinates of a point in a vacuum coordinate system
x: 25500
y: 25500
map: # coordinates of a point in a map coordinate system (can be read using e.g. Paint or Gimp)
x: 466
y: 1889
Following vacuum platforms are supported out of the box at this moment:
Xiaomi MiioRoborockhumbertogontijo/homeassistant-roborockTasshack/dreame-vacuumrand256/ValetudoREHypfer/Valetudo](/docs/templates/h$ claude mcp add lovelace-xiaomi-vacuum-map-card \
-- python -m otcore.mcp_server <graph>