I have the same issue, it seems that this is happening because it draws the map from the Xiaomi app.
When you start cleaning the Roborock is positioning. While it is positioning it has no map available.
As soon as the Roborock found his position the map returns.
Is there any way to reformat a tile with an entity state reported as a date time format (e.g. 2021-12-10T19:12:13)? Itās for a āLast Clean Endā entity. Iām just trying to display something a little simpler like ā1 day(s) agoā or ā10 Dec 2021ā.
You have to do it in a template sensor
Does anybody know how I can set the background color for the buttons (see arrows on the picture)?
Thanks!
Just add --map-card-secondary-color: <color>
to your theme
Thanks! That worked!
im confused.
- name: Path
icon: mdi:map-marker-path
selection_type: MANUAL_PATH
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: vacuum.do_path
service_data:
path: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
Where does service do_path come from? Its not listed anywhere except your demo_config.
And doesnt exist for me?
It is just a fake example, in the real world you have to use this script, which is used by
template: vacuum_follow_path
Since a few days, my Roborock S7 the fan speed is only output as a number. Is this related to the Xiaomi Miio integration or do others also have the problem?
Does it start to work when you select any fan speed in built-in vacuum popup?
Yes, in the popup i can select the fan speed and the vacuum takes it properly. But the fan speed attribute does not change
Ok, so this seems like a problem with Miio integration
Finally I decided to migrate from 1.x.x to 2.x.x and basically decided to start config from scratch. Below is the config based on camera:
type: custom:xiaomi-vacuum-map-card
title: Xiaomi Vacuum Map Card
preset_name: Live map
entity: vacuum.xiaomi_vacuum_cleaner
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
vacuum_platform: default
It still gives me Invalid calibration, please check your configuration
I looked at the suggestions above and started the vacuum cleaner (Roborock) to see if the map appears, but it didnĀ“t (although I have the entity camera.xiaomi cloud_map_extractor and it does work (and I see the robot moving) in a separate picture glance card.
Interesting additional info is that when trying to configure the card via UI configuration editor, I cannot select any camera. Could this be related?
Thanks for your help!
Thanks Piotr.
I was under the impression that the calibration points were automatic when using the camera. Is that not the case and you still need to provide calibration points?
They are automatic, but you have to enable them in cameraās config
Thanks and appreciate the feedbackā¦ IĀ“m still lostā¦
I now copied your demo config (adjusted the entity for the vacuum and removed the 3rd preset with perspective). Static image preset works fine (IĀ“ll fix rooms and zones later as I donĀ“t expect that to impact the calibration), but IĀ“m still getting the error on the live mapā¦ Even after starting the vacuum for a minute or so (I expected it to calibrate itselt), it still gives the same error of invalid calibrationā¦
This is my code nowā¦ what am I missing to make the live map and calibration work?
Thanks!
type: custom:xiaomi-vacuum-map-card
title: Xiaomi Vacuum Map Card
preset_name: Live map
entity: vacuum.xiaomi_vacuum_cleaner
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_zone_predefined
predefined_selections:
- zones:
- - 21485
- 28767
- 24236
- 32131
- - 23217
- 27379
- 24216
- 28737
label:
text: Bedroom
x: 22932
'y': 30339
offset_y: 35
icon:
name: mdi:bed
x: 22932
'y': 30339
- zones:
- - 27782
- 27563
- 29678
- 29369
label:
text: Kitchen
x: 28760
'y': 28403
offset_y: 35
icon:
name: mdi:pot-mix
x: 28760
'y': 28403
- template: vacuum_clean_segment
predefined_selections:
- id: 1
outline:
- - 21458
- 32131
- - 24235
- 32152
- - 24194
- 27409
- - 23181
- 27409
- - 23160
- 28807
- - 21417
- 28807
label:
text: Bedroom
x: 22932
'y': 30339
offset_y: 35
icon:
name: mdi:bed
x: 22932
'y': 30339
- id: 2
outline:
- - 21478
- 27237
- - 23048
- 27250
- - 23061
- 25655
- - 21478
- 25680
label:
text: Bathroom
x: 22282
'y': 26496
offset_y: 35
icon:
name: mdi:shower
x: 22282
'y': 26496
- id: 3
outline:
- - 30417
- 29895
- - 30694
- 29895
- - 30694
- 30338
- - 31358
- 30319
- - 33221
- 29194
- - 33055
- 28954
- - 34715
- 28087
- - 36172
- 27350
- - 36153
- 25966
- - 35969
- 25911
- - 35969
- 25155
- - 34217
- 25155
- - 34180
- 26151
- - 31671
- 26169
- - 31653
- 25173
- - 30343
- 25173
label:
text: Living room
x: 33036
'y': 27589
offset_y: 35
icon:
name: mdi:television
x: 33036
'y': 27589
- template: vacuum_goto
- template: vacuum_goto_predefined
predefined_selections:
- position:
- 32143
- 26284
label:
text: Sofa
x: 32143
'y': 26284
offset_y: 35
icon:
name: mdi:sofa
x: 32143
'y': 26284
- template: vacuum_follow_path
additional_presets:
- preset_name: Static image
entity: vacuum.xiaomi_vacuum_cleaner
map_source:
image: /local/map_vilamari.png
calibration_source:
calibration_points:
- vacuum:
x: 7450
'y': 27500
map:
x: 59
'y': 63
- vacuum:
x: 30000
'y': 26050
map:
x: 587
'y': 52
- vacuum:
x: 30000
'y': 26050
map:
x: 502
'y': 172
map_modes:
- name: Zones
icon: mdi:select-drag
selection_type: MANUAL_RECTANGLE
max_selections: 5
repeats_type: INTERNAL
max_repeats: 5
service_call_schema:
service: vacuum.do_zones
service_data:
zones: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- name: Predefined zones
icon: mdi:texture-box
selection_type: PREDEFINED_RECTANGLE
max_selections: 5
repeats_type: INTERNAL
max_repeats: 5
service_call_schema:
service: vacuum.do_zones
service_data:
zones: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'true'
target:
entity_id: '[[entity_id]]'
predefined_selections:
- zones:
- - 21485
- 28767
- 24236
- 32131
- - 23217
- 27379
- 24216
- 28737
label:
text: Bedroom
x: 22932
'y': 30339
offset_y: 35
icon:
name: mdi:bed
x: 22932
'y': 30339
- zones:
- - 27782
- 27563
- 29678
- 29369
label:
text: Kitchen
x: 28760
'y': 28403
offset_y: 35
icon:
name: mdi:pot-mix
x: 28760
'y': 28403
- name: Rooms
icon: mdi:floor-plan
selection_type: ROOM
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: vacuum.do_rooms
service_data:
rooms: '[[selection]]'
predefined: 'true'
target:
entity_id: '[[entity_id]]'
predefined_selections:
- id: 1
outline:
- - 21458
- 32131
- - 24235
- 32152
- - 24194
- 27409
- - 23181
- 27409
- - 23160
- 28807
- - 21417
- 28807
label:
text: Bedroom
x: 22932
'y': 30339
offset_y: 35
icon:
name: mdi:bed
x: 22932
'y': 30339
- id: 2
outline:
- - 21478
- 27237
- - 23048
- 27250
- - 23061
- 25655
- - 21478
- 25680
label:
text: Bathroom
x: 22282
'y': 26496
offset_y: 35
icon:
name: mdi:shower
x: 22282
'y': 26496
- id: 3
outline:
- - 30417
- 29895
- - 30694
- 29895
- - 30694
- 30338
- - 31358
- 30319
- - 33221
- 29194
- - 33055
- 28954
- - 34715
- 28087
- - 36172
- 27350
- - 36153
- 25966
- - 35969
- 25911
- - 35969
- 25155
- - 34217
- 25155
- - 34180
- 26151
- - 31671
- 26169
- - 31653
- 25173
- - 30343
- 25173
label:
text: Living room
x: 33036
'y': 27589
offset_y: 35
icon:
name: mdi:television
x: 33036
'y': 27589
- name: Path
icon: mdi:map-marker-path
selection_type: MANUAL_PATH
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: vacuum.do_path
service_data:
path: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- name: Manual Point
icon: mdi:map-marker-plus
selection_type: MANUAL_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: vacuum.do_point
service_data:
point: '[[selection]]'
point_x: '[[point_x]]'
point_y: '[[point_y]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- name: Predefined Point
icon: mdi:map-marker
selection_type: PREDEFINED_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: vacuum.do_point
service_data:
point: '[[selection]]'
repeats: '[[repeats]]'
point_x: '[[point_x]]'
point_y: '[[point_y]]'
predefined: 'true'
target:
entity_id: '[[entity_id]]'
predefined_selections:
- position:
- 28006
- 28036
label:
text: Emptying
x: 28006
'y': 28036
offset_y: 35
icon:
name: mdi:broom
x: 28006
'y': 28036
- position:
- 32143
- 26284
label:
text: Sofa
x: 32143
'y': 26284
offset_y: 35
icon:
name: mdi:sofa
x: 32143
'y': 26284
Can you post config of your xiaomi_cloud_map_extractor?
Sure I can:
I installed through the HACS integration.
Configuration.yaml:
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.1.40
token: !secret vacuumtoken
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
country: "de"
draw: ["all"]
lovelace card:
type: picture-glance
title: Live map
image: https://demo.home-assistant.io/stub_config/kitchen.png
entities: []
camera_image: camera.xiaomi_cloud_map_extractor
You have to use this config:
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.1.40
token: !secret vacuumtoken
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
country: "de"
draw: ["all"]
attributes:
- calibration_point