This card enables you to specify target or start zoned cleanup using map, just like in Mi Home app. Additionally you can define a list of zones and choose ones to be cleaned.
Key | Type | Required | Default | Description |
---|---|---|---|---|
entity |
string |
True |
- | ID of Xiaomi vacuum entity |
map_image |
string |
True |
- | Path to image of map |
base_position |
string |
True |
- | Coordinates of pixel corresponding to base position (25500, 25500) on map image |
reference_point |
string |
True |
- | Coordinates of pixel corresponding to reference point (26500, 26500) on map image |
zones |
List |
False |
Empty | List of predefined zones |
debug |
boolean |
False |
false |
Enables alerts with coordinates after holding Start button. Possible values: true , false |
views:
- name: Example
cards:
- type: custom:xiaomi-vacuum-map-card
entity: vacuum.xiaomi_vacuum
map_image: '/local/custom_lovelace/xiaomi_vacuum_map_card/map.png'
base_position:
x: 1889
y: 1600
reference_point:
x: 1625
y: 1336
zones:
- [[25500, 25500, 26500, 26500]]
- [[24215, 28125, 29465, 32175]]
- [[24245, 25190, 27495, 27940], [27492, 26789, 28942, 27889]]
- [[28972, 26715, 31072, 27915], [29457, 27903, 31107, 29203], [30198, 29215, 31498, 31215], [29461, 31228, 31511, 32478]]
- Download xiaomi-vacuum-map-card.js, texts.js and style.js to
/www/custom_lovelace/xiaomi_vacuum_map_card
directory:mkdir -p www/custom_lovelace/xiaomi_vacuum_map_card cd www/custom_lovelace/xiaomi_vacuum_map_card/ wget https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/dist/xiaomi-vacuum-map-card.js wget https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/dist/texts.js wget https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/dist/style.js
- Add card to resources in
ui-lovelace.yaml
or in raw editor if you are using frontend UI editor:resources: - url: /local/custom_lovelace/xiaomi_vacuum_map_card/xiaomi-vacuum-map-card.js type: module
-
To find out values for
base_position
andreference_point
use servicevacuum.send_command
with data:base_postion
:{ "entity_id": "vacuum.xiaomi_vacuum", "command": "app_goto_target", "params": [25500, 25500] }
reference_point
:{ "entity_id": "vacuum.xiaomi_vacuum", "command": "app_goto_target", "params": [26500, 26500] }
Alternatively you can use
vacuum.xiaomi_clean_zone
:{ "entity_id": "vacuum.xiaomi_vacuum", "zone": [[25500, 25500, 26500, 26500]], "repeats": 1 }
-
You can find out coordinates for zones using two methods:
- Enabling
debug
in settings, drawing zone inZoned cleanup
mode and holdingStart
button. Note: this method also works for other modes. - Android App FloleVac
- Enabling
-
For Polish version download textsPL.js and change filename to
texts.js
-
Does this card show live map?
No, you have to prepare your own map in an image
-
Does this card require rooted device?
No, as it only utilises features already existing in Home Assistant integration
-
How to create map?
You can use any image you want, the easisest way is to use screenshot from Mi Home/FloleVac.
Thread on community.home-assistant.io: Xiaomi Vacuum Interactive Map Card