繁體中文
繁體中文
外觀
繁體中文
繁體中文
外觀
Lovelace 小米掃地機地圖卡 提供了一種用戶友好的方式,以在 Home Assistant 中完全控制基於地圖的掃地機。
雖然此卡與 Dreame Vacuum 整合完全兼容,但其自動配置生成存在一些限制和缺失功能。為了解決這個問題,此卡可以通過 自動模板 或 手動配置 來配置。
為了自動生成完整的卡片配置(支持房間和區域清潔),使用了 Home Assistant 模板編輯器。
如果 我的 Home Assistant 整合功能已啟用,可使用下方按鈕直接前往模板編輯器:
範本工具於如需手動導航,請依照以下步驟操作:
::: 詳情 顯示模板
{# ----------------- 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]]':::
更新實體名稱
將模板粘貼到編輯器後,別忘了更新 camera_entity 和 vacuum_entity 的值為您自己的實體名稱。
通過儀表板 UI 手動配置卡片時,添加卡片後必須明確設置若干參數:
dreame_vacuum 整合提供的設備所屬的 vacuum 實體。camera.{device_name}_map) 實體。Tasshack/dreame-vacuum。平台選擇
吸塵器平台的預設值為 xiaomi miio。至關重要的是要從下拉選單中更改它,並明確設置為 Tasshack/dreame-vacuum。如果不更改,從卡片發送的命令將因無效命令錯誤而失敗,因為預設命令無法被整合識別。
選擇正確的實體和平台後,點擊 Generate rooms config 按鈕以建立房間配置,然後點擊 Save 以套用更改。
type: custom:xiaomi-vacuum-map-card
entity: # Your vacuum entity
map_source:
camera: # Map Entity
calibration_source:
camera: true
vacuum_platform: Tasshack/dreame-vacuum