yeah the map updating seems slow, only comes up a while after cleaning or something
the zone cleaning commands are a pain in the bum to set up, there are guides on how to do it on github, see this post https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/318
and here https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/317
I ended up making a excel spreadsheet to do most of the work for me. rather than sharing a spreadsheet ill post in pseudo code. so the first row is the 4 values returned from the popup (in post 318 above), the room ID, name and icon I set to my liking in row 3
590 -1302 4370 2754
RoomID RoomName Icon
5 Dining mdi:countertop
then in a cell i have the following equation
=CONCATENATE(" - id: ",A3,"
outline: [[",A1,",",D1,"],[",A1,",",B1,"],[",C1,",",B1,"],[",C1,",",D1,"]]
label:
text: ",B3,"
x: ",((C1-A1)/2)+A1,"
'y': ",((D1-B1)/2)+B1,"
offset_y: 35
icon:
name: ",C3,"
x: ",((C1-A1)/2)+A1,"
'y': ",((D1-B1)/2)+B1)
this gives me a text string that i can copy and paste directly into the yaml config for the card
if it helps here is my full card config
- type: custom:xiaomi-vacuum-map-card
entity: vacuum.dreame_p2028_e5ea_robot_cleaner
vacuum_platform: default
debug: false
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
camera_calibration: true
two_finger_pan: true
map_locked: true
title: Ruby
map_modes:
- template: vacuum_clean_zone
max_selections: 1
repeats_type: EXTERNAL
max_repeats: 5
service_call_schema:
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.dreame_p2028_e5ea_robot_cleaner
siid: 4
aiid: 1
params:
- piid: 1
value: 19
- piid: 10
value: '{"areas":[[[[selection_unwrapped]],[[repeats]],1,1]]}'
force_params: true
- template: vacuum_clean_segment
max_selections: 1
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.dreame_p2028_e5ea_robot_cleaner
siid: 4
aiid: 1
params:
- piid: 1
value: 18
- piid: 10
value: '{"selects":[[[[selection_unwrapped]],[[repeats]],3,3,1]]}'
force_params: true
predefined_selections:
- id: 1
outline:
- - 4688
- 10055
- - 4688
- 5434
- - 732
- 5434
- - 732
- 10055
label:
text: Room1
x: 2710
'y': 7745
offset_y: 35
icon:
name: mdi:bed
x: 2710
'y': 7745
- id: 2
outline:
- - -7308
- 10055
- - -7308
- 6880
- - -3669
- 6880
- - -3669
- 10055
label:
text: Room2
x: -5488
'y': 8467
offset_y: 35
icon:
name: mdi:bed
x: -5488
'y': 8467
- id: 3
outline:
- - -2441
- 5047
- - -2441
- 1273
- - 579
- 1273
- - 579
- 5047
label:
text: Living Room
x: -931
'y': 3160
offset_y: 35
icon:
name: mdi:youtube-tv
x: -931
'y': 3160
- id: 4
outline:
- - 943
- 5188
- - 943
- 2472
- - 3806
- 2472
- - 3806
- 5188
label:
text: Kitchen
x: 2374.5
'y': 3830
offset_y: 35
icon:
name: mdi:countertop
x: 2374.5
'y': 3830
- id: 5
outline:
- - 590
- 2754
- - 590
- -1302
- - 4370
- -1302
- - 4370
- 2754
label:
text: Dining
x: 2480
'y': 726
offset_y: 35
icon:
name: mdi:countertop
x: 2480
'y': 726
tiles:
- label: Status
entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: status
icon: mdi:robot-vacuum
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-unknown
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-unknown
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-outline
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-outline
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-alert
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-alert
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-10
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-10
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-20
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-20
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-30
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-30
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-40
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-40
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-50
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-50
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-60
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-60
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-70
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-70
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-80
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-80
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-90
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-90
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-100
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-charging-100
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-10
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-10
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-20
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-20
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-30
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-30
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-40
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-40
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-50
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-50
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-60
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-60
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-70
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-70
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-80
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-80
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-90
unit: '%'
tap_action: none
conditions:
- entity: vacuum.dreame_p2028_e5ea_robot_cleaner
attribute: battery_icon
value: mdi:battery-90
- label: Fan Speed
entity: vacuum.ruby
attribute: fan_speed
icon: mdi:fan
- label: Mop
entity: vacuum.ruby
attribute: waterbox
icon: mdi:water
- label: Filter
entity: vacuum.ruby
attribute: filter_time_left
icon: mdi:air-filter
unit: ' h'
- label: Main Brush
entity: vacuum.ruby
attribute: main_brush_time_left
icon: mdi:atom-variant
unit: ' h'
- label: Side Brush
entity: vacuum.ruby
attribute: side_brush_time_left
icon: mdi:axis
unit: ' h'