question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Support of Xiaomi Miot vacuum platform

See original GitHub issue

Description

Please add support of al-one/hass-xiaomi-miot platform.

Solution

Example of calling service for zone cleaning:

vacuum_carpet:
  sequence:
    - service: xiaomi_miot.call_action
      data:
        entity_id: vacuum.dreame_d9
        siid: 4
        aiid: 1
        params:
          - piid: 1
            value: 19
          - piid: 10
            value: '{"areas":[[-1300,-2150,-20,-390,3,1,1]]}'
        force_params: true

…and room:

vacuum_room:
  sequence:
    - service: xiaomi_miot.call_action
      data:
        entity_id: vacuum.dreame_d9
        siid: 4
        aiid: 1
        params:
          - piid: 1
            value: 18
          - piid: 10
            value: '{"selects":[[4,1,3,3,1]]}'
        force_params: true

Alternatives

No response

Context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:58 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
PiotrMachowskicommented, Jun 10, 2022

Here you have yaml with fixed indentaion:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.v38_cloud_146784
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
map_modes:
  - template: vacuum_goto
  - template: vacuum_clean_zone
    max_selections: 1
    repeats_type: EXTERNAL
    max_repeats: 5
    service_call_schema:
      service: xiaomi_miot_raw.call_action
      service_data:
        entity_id: vacuum.v38_cloud_146784
        siid: 18                          # vacuum-extend
        aiid: 1                           # start-clean
        params:
          - piid: 1                       # work mode
            value: 19                    
          - piid: 21                      # clean-info
            value: '{"areas":[[[[selection_unwrapped]],[[repeats]],1,1]]}'
        force_params: true
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 1
        label:
          text: Room 1
2reactions
PiotrMachowskicommented, Apr 14, 2022

Template processor has been improved in v2.0.9. Now it is possible to use xiaomi_miot.call_action service:

  • Vacuum zone

    - 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: '[[entity_id]]'
          siid: 4
          aiid: 1
          params:
            - piid: 1
              value: 19
            - piid: 10
              value: '{"areas":[[[[selection_unwrapped]],[[repeats]],1,1]]}'
          force_params: true
    
  • Vacuum room

    - template: vacuum_clean_segment
      max_selections: 1
      repeats_type: EXTERNAL
      max_repeats: 5
      service_call_schema:
        service: xiaomi_miot.call_action
        service_data:
          entity_id: '[[entity_id]]'
          siid: 4
          aiid: 1
          params:
            - piid: 1
              value: 18
            - piid: 10
              value: '{"selects":[[[[selection_unwrapped]],[[repeats]],3,3,1]]}'
          force_params: true
      predefined_selections:
        ...
    
Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto integrate all Xiaomi devices to HomeAssistant via miot ...
This component uses the miot protocol to automatically integrate Xiaomi devices into HomeAssistant, and currently supports most Xiaomi IoT ...
Read more >
homebridge-miot - HOOBS
homebridge-miot is a plugin for which allows you to control any device supporting the miot protocol from Xiaomi!
Read more >
python-miio - PyPI
Xiaomi Mi Robot Vacuum Mop 2 (Pro+, Ultra). Feel free to create a pull request to add support for new devices as well...
Read more >
MiOT Ecosystem
MIUI Global — Xiaomi department, responsible for software development and maintenance. ... 21KE — the manufacturer of smartphones and feature phones.
Read more >
homebridge-xiaomi-roborock-vacuum - npm package - Snyk
This feature seems to be working on models that support naming the rooms in the Xiaomi / Roborock App. This is known to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found