Xiaomi MIoT configs #406
Replies: 11 comments 28 replies
-
Dreame D9 (
|
Beta Was this translation helpful? Give feedback.
-
Xiaomi Mi Mop/Xiaomi Mijia 1C (
|
Beta Was this translation helpful? Give feedback.
-
Dreame L10 Pro (
|
Beta Was this translation helpful? Give feedback.
-
Mi Robot Vacuum-Mop (
|
Beta Was this translation helpful? Give feedback.
-
Xiaomi Mijia 2C (
|
Beta Was this translation helpful? Give feedback.
-
Viomi V3 Max (viomi.vacuum.v23)
I didn't mess with repeats, but I don't think it will fit neatly into a single service call like other vacuums. - template: vacuum_clean_segment
service_call_schema:
service: xiaomi_miot.call_action
max_selections: 7
service_data:
entity_id: '[[entity_id]]'
siid: 4
aiid: 13
params:
- piid: 36
value: 0
- piid: 37
value: 1
- piid: 38
value: '[[selection_unwrapped]]'
force_params: true
Requires 2 service calls - the first to set the zone properties, then a second to start zone cleaning, which does not work in the # In map card:
- template: vacuum_clean_zone_predefined
name: Zones
service_call_schema:
service: input_number.set_value
service_data:
value: '[[zone_id]]'
entity_id: input_number.vacuum_zone_id
predefined_selections:
- zones: # Since these are not used in the actual automation, I've opted to display just an icon without zone outlines
- - 0
- 0
- 0
- 0
icon:
name: mdi:rug
x: -2475
'y': -1025
variables:
zone_id: 1
# Automation:
alias: "Vacuum: Trigger zone"
trigger:
- platform: numeric_state
entity_id: input_number.vacuum_zone_id
above: 0
condition: []
action:
- service: script.vacuum_clean_zone
data: {}
mode: single
# Script:
alias: "Vacuum: Clean Zone"
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ states('input_number.vacuum_zone_id') | float == 1 }}"
sequence:
- service: xiaomi_miot.set_miot_property
data:
entity_id: vacuum.dusty
siid: 6
piid: 2
value: "-3.4635,-0.3383,-3.4635,-2.5510,-0.1483,-2.5510,-0.1483,-0.3383"
- service: input_number.set_value # Reset to 0 so that selecting the next zone clean-up triggers automation.
data:
value: 0
target:
entity_id: input_number.vacuum_zone_id
- service: xiaomi_miot.call_action
data:
siid: 6
aiid: 5
entity_id: vacuum.dusty
mode: single
- service: xiaomi_miot.set_miot_property
data:
entity_id: vacuum.dusty
siid: 6
piid: 1
value: "-3.4635,-0.3383"
- service: xiaomi_miot.call_action
data:
siid: 6
aiid: 1
entity_id: vacuum.dusty |
Beta Was this translation helpful? Give feedback.
-
Anyone have i tried that from L10 Pro, it says "Success" but doesnt starting
Getting that result: |
Beta Was this translation helpful? Give feedback.
-
Xiaomi Mop 2 Pro+ (dreame.vacuum.p2041o)
script:
WARNING: multi zone is working for Rooms |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Lydsto R1 zhimi.vacuum.xa1type: custom:xiaomi-vacuum-map-card
entity: vacuum.zhimi_xa1_34d1_robot_cleaner
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_segment
max_selections: 9
repeats_type: EXTERNAL
max_repeats: 5
service_call_schema:
service: xiaomi_miot.call_action
service_data:
entity_id: "[[entity_id]]"
siid: 12
aiid: 1
params:
- 2
- "{\"mapId\":1731406885,\"segmentId\":[[selection]]}"
predefined_selections:
**.......ROOMS............**
- template: vacuum_clean_zone
max_selections: 9
repeats_type: EXTERNAL
max_repeats: 5
name: Уборка зоны
selection_type: MANUAL_RECTANGLE
coordinates_to_meters_divider: 1
service_call_schema:
service: xiaomi_miot.call_action
evaluate_data_as_template: true
service_data:
entity_id: "[[entity_id]]"
siid: 12
aiid: 1
params:
- 2
- |-
{% set s=[[[selection_unwrapped]]] %}
{
"MapId": 1731406885,
"ExtraAreas": [
{
"name": "Custom Zone",
"id": 301,
"tag": "zone301",
"vertexs": [[{{s[0]}},{{s[1]}}],[{{s[2]}},{{s[1]}}],[{{s[2]}},{{s[3]}}],[{{s[0]}},{{s[3]}}]],
"active": "normal",
"mode": "area"
}
]
}
- template: vacuum_goto
max_selections: 9
repeats_type: EXTERNAL
max_repeats: 5
service_call_schema:
service: xiaomi_miot.call_action
evaluate_data_as_template: true
service_data:
entity_id: "[[entity_id]]"
siid: 12
aiid: 1
params:
- 4
- >-
{"MapId":1731406885,"ExtraAreas":[{"name":"point","id":301,"tag":"zone","vertexs":
{% set s=[[[selection_unwrapped]]]%}
[[{{s[0]-[[point_size]]}},{{s[1]+[[point_size]]}}],
[{{s[0]+[[point_size]]}},{{s[1]+[[point_size]]}}],
[{{s[0]+[[point_size]]}},{{s[1]-[[point_size]]}}],
[{{s[0]-[[point_size]]}},{{s[1]-[[point_size]]}}]],"active":"normal","mode":"point"}]}
predefined_selections: []
variables:
point_size: 700
vacuum_platform: default
map_locked: true
tiles:
- tile_id: status
entity: vacuum.zhimi_xa1_34d1_robot_cleaner
label: Статус
attribute: vacuum.status
translations:
"1": Спящий режим
"2": Бездействие
"3": Пауза
"4": Уборка
"5": Иду на зарядку
"6": На зарядке
"7": Ошибка
"8": Rfctrl
"9": У док-станции
"10": Выключение
"11": Пауза для подзарядки
"12": Сбор пыли
"13": Построение карты
"14": Пауза построения карты
icon: mdi:robot-vacuum
- tile_id: status
entity: vacuum.zhimi_xa1_34d1_robot_cleaner
label: Тип уборки
attribute: vacuum.sweep_type
icon: mdi:broom
translations:
"0": Подметание
"1": Мытьё
"2": Подметание и мытьё
- tile_id: battery_level
entity: sensor.zhimi_xa1_34d1_battery_level
icon: mdi:battery
label: Батарея
- tile_id: fault
entity: vacuum.zhimi_xa1_34d1_robot_cleaner
label: Ошибки
attribute: vacuum.fault
icon: mdi:alert-circle
translations:
"0": Всё чётко
"1": Низкий заряд батареи, начните подзарядку
"2": Низкий заряд батареи и отключение питания
"3": Заедание колеса Застряло ли главное колесо
"4": Ошибка столкновения
"5": Tile Do Task
"6": Ошибка точки лидара
"7": Ошибка передней стенки
"8": PSD грязный
"9": Средняя кисть Fatal
"10": Застряла боковая щётка
"11": Скорость вентилятора
"12": Крышка лидара
"13": Мусорный ящик полный
"14": Мусорный ящик извлечён
"15": Внешний мусорный ящик полный
"16": Physical Trapped
"17": Pick Up Do Task
"18": No Water Box Do Task
"19": Контейнер для воды пуст
"20": Clean Cannot Arrive
"21": Start Form Forbid
"22": Drop
"23": Комплект водяного насоса
"24": Зарядное устройство не найдено
"25": Неисправность водяного насоса
"26": Нет задачи «Вымыть пол»
"27": Ошибка лидара
"28": Found Charger Error
"29": Charger Error
icons:
- icon: mdi:play
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: cleaning
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: error
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: returning
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: paused
tooltip: Start
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
- icon: mdi:play
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value: paused
tooltip: Continue
tap_action:
action: call-service
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 2
aiid: 1
- icon: mdi:pause
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: docked
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: idle
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: error
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: returning
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: paused
tooltip: Pause
tap_action:
action: call-service
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 2
aiid: 5
- icon: mdi:stop
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: docked
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: idle
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: error
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: paused
tooltip: Stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
- icon: mdi:home-map-marker
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: docked
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value_not: returning
tooltip: Return to base
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
- menu_id: fan_speed
icon: mdi:fan-remove
label: Тихий
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: fan_speed
value: Silent
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
fan_speed: Silent
- menu_id: fan_speed
icon: mdi:fan-speed-1
label: Стандартный
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: fan_speed
value: Basic
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
fan_speed: Basic
- menu_id: fan_speed
icon: mdi:fan-speed-2
label: Средний
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: fan_speed
value: Strong
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
fan_speed: Strong
- menu_id: fan_speed
icon: mdi:fan-speed-3
label: Мощный
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: fan_speed
value: Full Speed
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
fan_speed: Full Speed
- icon: mdi:land-plots-marker
tooltip: Find robot
tap_action:
action: call-service
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
aiid: 3
- menu_id: dust_collection
icon: mdi:download-off
label: Disabled
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.work_station_freq
value: "0"
tooltip: Change Dust collection times
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 3
value: 0
- menu_id: dust_collection
icon: mdi:download
label: Every time
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.work_station_freq
value: "1"
tooltip: Change Dust collection times
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 3
value: 1
- menu_id: dust_collection
icon: mdi:download
label: Every 2 times
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.work_station_freq
value: "2"
tooltip: Change Dust collection times
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 3
value: 2
- menu_id: dust_collection
icon: mdi:download
label: Every 3 times
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.work_station_freq
value: "3"
tooltip: Change Dust collection times
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 3
value: 3
- icon: mdi:download-box-outline
tooltip: Clear vacuum
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
value: docked
tap_action:
action: call-service
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
aiid: 13
- icon: mdi:numeric-2-box-multiple-outline
tooltip: Double Clean ON
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.double_clean
value: true
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 27
value: false
- icon: mdi:numeric-1-box-outline
tooltip: Double Clean OFF
conditions:
- entity: vacuum.zhimi_xa1_34d1_robot_cleaner
attribute: custom.double_clean
value_not: true
tap_action:
action: call-service
service: xiaomi_miot.set_miot_property
service_data:
entity_id: vacuum.zhimi_xa1_34d1_robot_cleaner
siid: 7
piid: 27
value: true
language: ru Need help |
Beta Was this translation helpful? Give feedback.
-
hello , |
Beta Was this translation helpful? Give feedback.
-
Here you can share service call schemas for Xiaomi MIoT integration.
Do not post other problems/questions in this thread as they will be removed
Beta Was this translation helpful? Give feedback.
All reactions