English
Appearance
English
Appearance
The Lovelace Xiaomi Vacuum Map Card provides a user-friendly way to fully control map-based vacuums in Home Assistant.
Although the card is fully compatible with the Dreame Vacuum integration, its automatic configuration generation has some limitations and missing features. To resolve this, the card can either be configured using an automatic template or through manual configuration.
To automatically generate a complete card configuration with room and zone cleaning support, the Home Assistant Template Editor is utilized.
If the My Home Assistant integration is active, the button below can be used to navigate directly to the Template Editor:
Template tools ofIf manual navigation is required, follow these steps:
{# ----------------- PROVIDE YOUR OWN ENTITY IDS HERE ----------------- #}
{% set camera_entity = "camera." %}
{% set vacuum_entity = "vacuum." %}
{# ------------------- DO NOT CHANGE ANYTHING BELOW ------------------- #}
{% set attributes = states[camera_entity].attributes %}
type: custom:xiaomi-vacuum-map-card
vacuum_platform: default
entity: {{ vacuum_entity }}
map_source:
camera: {{ camera_entity }}
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_zone
max_selections: 10
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: dreame_vacuum.vacuum_clean_zone
service_data:
entity_id: '[[entity_id]]'
zone: '[[selection]]'
repeats: '[[repeats]]'
- template: vacuum_clean_segment
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: dreame_vacuum.vacuum_clean_segment
service_data:
entity_id: '[[entity_id]]'
segments: '[[selection]]'
repeats: '[[repeats]]'
predefined_selections:
{%- for room_id in attributes.rooms | default([]) %}
{%- set room = attributes.rooms[room_id] %}
- id: {{room_id}}
outline:
- - {{room["x0"]}}
- {{room["y0"]}}
- - {{room["x0"]}}
- {{room["y1"]}}
- - {{room["x1"]}}
- {{room["y1"]}}
- - {{room["x1"]}}
- {{room["y0"]}}
{%- endfor %}
- name: Clean Spot
icon: mdi:map-marker-plus
max_repeats: 3
selection_type: MANUAL_POINT
repeats_type: EXTERNAL
service_call_schema:
service: dreame_vacuum.vacuum_clean_spot
service_data:
entity_id: '[[entity_id]]'
points: '[[selection]]'
repeats: '[[repeats]]'Update Entity Names
Do not forget to update the camera_entity and vacuum_entity values with your own entity names after pasting the template into the editor.
When configuring the card manually via the dashboard UI, several parameters must be explicitly set after adding the card:
vacuum entity belonging to the device provided by the dreame_vacuum integration from the Vacuum Entity dropdown.camera.{device_name}_map) entity belonging to the exact same device from the Map Entity dropdown.Tasshack/dreame-vacuum from the Vacuum Platform dropdown.Platform Selection
The vacuum platform defaults to xiaomi miio. It is critical to change this from the dropdown and explicitly set it to Tasshack/dreame-vacuum. If it is not changed, the device will become unavailable when a command is sent from the card because the default commands are not recognized by the integration and the device will fail to respond.
Once the correct entities and platform are selected, click the Generate rooms config button to build the room configuration, and then click Save to apply the changes.
type: custom:xiaomi-vacuum-map-card
entity: # Your vacuum entity
map_source:
camera: # Map Entity
calibration_source:
camera: true
vacuum_platform: Tasshack/dreame-vacuum