Skip to content

Latest commit

 

History

History
606 lines (493 loc) · 15.4 KB

services.md

File metadata and controls

606 lines (493 loc) · 15.4 KB

Services

The integration adds the following services to vacuum domain.

Vacuum Services

Services for actions that are not available via an entity. Open your Home Assistant instance and show your service developer tools.

dreame_vacuum.vacuum_clean_segment

Start selected room cleaning with optional customized cleaning parameters.

  • If you are using integration with map feature, you can acquire segment ids from vacuum entity attributes.
  • Cleaning parameters and cleaning sequence are ignored by the device when customized_cleaning or cleaning_sequence is enabled.

Examples:

  • Clean room 3

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments: 3
    target:
      entity_id: vacuum.vacuum
  • Clean room 3 and 5

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments:
        - 3
        - 5
    target:
      entity_id: vacuum.vacuum
  • Clean room 3 and 5 two times

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments:
        - 3
        - 5
      repeats: 2
    target:
      entity_id: vacuum.vacuum
  • Clean room 2 two times and 5 one time

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments:
        - 3
        - 5
      repeats: 
        - 2
        - 1
    target:
      entity_id: vacuum.vacuum
  • Clean room 3 and 5 with high fan speed

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments:
        - 3
        - 5
      suction_level: "high"
    target:
      entity_id: vacuum.vacuum
  • Clean room 3 with high fan speed and 5 with quiet fan speed

    service: dreame_vacuum.vacuum_clean_segment
    data:
      segments:
        - 3
        - 5
      suction_level: 
        - "high"
        - "quiet"
    target:
      entity_id: vacuum.vacuum

dreame_vacuum.vacuum_clean_zone

Start selected zone cleaning with optional customized cleaning parameters.

You can acquire zone coordinates with Xiaomi Vacuum Map Card.

Examples:

  • Clean selected zone

    service: dreame_vacuum.vacuum_clean_zone
    data:
      zone: 
        - 819
        - -263
        - 4424
        - 2105
    target:
      entity_id: vacuum.vacuum
  • Clean multiple zones

    service: dreame_vacuum.vacuum_clean_zone
    data:
      zone: 
        - - 819
          - -263
          - 4424
          - 2105
        - - 2001
          - -3050
          - 542
          - 515
    target:
      entity_id: vacuum.vacuum
  • Clean selected zone two times

    service: dreame_vacuum.vacuum_clean_zone
    data:
      zone: 
        - 819
        - -263
        - 4424
        - 2105
      repeats: 2
    target:
      entity_id: vacuum.vacuum
  • Clean first zone two times second zone three times

    service: dreame_vacuum.vacuum_clean_zone
    data:
      zone: 
        - - 819
          - -263
          - 4424
          - 2105
        - - 2001
          - -3050
          - 542
          - 515
      repeats: 
        - 2
        - 3
    target:
      entity_id: vacuum.vacuum
    ```tity_id: vacuum.vacuum

dreame_vacuum.vacuum_clean_spot

Start selected spot cleaning with optional customized cleaning parameters.

Spot cleaning feature is only available for Xiaomi/Mijia branded robots but it works with the Dreame devices too.

You can acquire point coordinates with Xiaomi Vacuum Map Card.

Examples:

  • Clean selected spot

    service: dreame_vacuum.vacuum_clean_spot
    data:
      points: 
        - 819
        - -263
    target:
      entity_id: vacuum.vacuum
  • Clean multiple spots

    service: dreame_vacuum.vacuum_clean_spot
    data:
      points: 
        - - 819
          - -263
        - - 2001
          - -3050
    target:
      entity_id: vacuum.vacuum
  • Clean selected spot two times

    service: dreame_vacuum.vacuum_clean_spot
    data:
      points: 
        - 819
        - -263
      repeats: 2
    target:
      entity_id: vacuum.vacuum
  • Clean first spot two times second spot three times

    service: dreame_vacuum.vacuum_clean_spot
    data:
      points: 
        - - 819
          - -263
        - - 2001
          - -3050
      repeats: 
        - 2
        - 3
    target:
      entity_id: vacuum.vacuum
    ```tity_id: vacuum.vacuum

dreame_vacuum.vacuum_set_dnd

Set do not disturb settings. (This service exists because the lack of date_time entity on Home Assistant)

Examples:

  • Set DND start time

    service: dreame_vacuum.vacuum_set_dnd
    data:
      dnd_start: "20:00"
    target:
      entity_id: vacuum.vacuum
  • Set DND start and end times

    service: dreame_vacuum.vacuum_set_dnd
    data:
        dnd_start: "20:00"
        dnd_end: "08:00"
    target:
        entity_id: vacuum.vacuum
  • Disable DND feature

    service: dreame_vacuum.vacuum_set_dnd
    data:
        dnd_enabled: false
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_remote_control_move_step

Send remote control command to vacuum. (For use of a custom lovelace card)

dreame_vacuum.vacuum_install_voice_pack

Install an official voice pack.

dreame_vacuum.vacuum_set_cleaning_sequence

Set room cleaning sequence on current map.

Exact number of room ids must be passed as sequence list

Example:

  • Set room cleaning sequence on current map to 3, 5, 4, 2, 1

    service: dreame_vacuum.vacuum_set_cleaning_sequence
    data:
        cleaning_sequence: 
          - 3
          - 5
          - 4
          - 2
          - 1
    target:
        entity_id: vacuum.vacuum
  • Disable custom cleaning sequence on current map

    service: dreame_vacuum.vacuum_set_cleaning_sequence
    data:
        cleaning_sequence: []
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_set_custom_cleaning

Set customized room cleaning parameters on current map.

Settings for all rooms must be passed as list

Examples:

  • Set room 1 fan speed to quiet, water level to low, cleaning times to 2 and room 2 fan speed to turbo, water level to medium, repeats to 1
    service: dreame_vacuum.vacuum_set_custom_cleaning
    data:
        suction_level: 
          - 0
          - 3
        water_volume: 
          - 1
          - 2
        repeats: 
          - 2
          - 1
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_reset_consumable

Reset a consumable life by type.

Examples:

  • Reset Main Brush Life

    service: dreame_vacuum.vacuum_reset_consumable
    data:
        consumable: "main_brush"
    target:
        entity_id: vacuum.vacuum
  • Reset Mop Pad Life

    service: dreame_vacuum.vacuum_reset_consumable
    data:
        consumable: "mop_pad"
    target:
        entity_id: vacuum.vacuum

vacuum.send_command

Send command service can be used to send raw api requests that are not available with this integration.

More info about commands and parameters.

Examples:

  • Start auto emptying

    service: vacuum.send_command
    data:
        entity_id: vacuum.vacuum
        command: action
        params: 
            did: "15.1"
            siid: 15
            aiid: 1
            in: []
  • Enable tight mopping pattern and disable carpet boost

    service: vacuum.send_command
    data:
        entity_id: vacuum.vacuum
        command: set_properties
        params: 
          - did: "4.29"
            siid: 4
            piid: 29
            value: 1
          - did: "4.12"
            siid: 4
            piid: 12
            value: 0

Map Services

Map editing services also uses the vacuum domain because all services are available even without cloud connection.

Open your Home Assistant instance and show your service developer tools.

dreame_vacuum.vacuum_request_map

Request device to upload a new map to the cloud. (This service is useful when cloud connection is not used and another integration used for handing the map rendering)

Device does not responds to this action when:

  • Spot cleaning
  • Fast mapping
  • Relocating
  • After a map edit until it moves

dreame_vacuum.vacuum_select_map

Change currently selected map. (Only possible of multi-floor map is enabled)

You can acquire map id from saved map camera entity attributes.

Robot will end active job when selected map is changed.

Example:

  • Set current map as map with id 27
    service: dreame_vacuum.vacuum_select_map
    data:
        map_id: 27
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_delete_map

Delete a map.

  • You can acquire map id from saved map camera entity attributes.
  • When multi-floor map feature is enabled map indexes may change after deletion. (More about multi-floor map support)

Example:

  • Set delete map with id 48
    service: dreame_vacuum.vacuum_delete_map
    data:
        map_id: 48
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_rename_map

Rename a map.

  • You can acquire map id from saved map camera entity attributes.
  • Official App does not allow you to enter special characters in map name but this integration does so use this service carefully.

Example:

  • Rename map with id 14 to "Second Floor"
    service: dreame_vacuum.vacuum_rename_map
    data:
        map_id: 14
        map_name: "Second Floor"
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_set_restricted_zone

Set invisible walls, no go and no mopping zones on current map.

  • You can acquire line and zone coordinates with Xiaomi Vacuum Map Card.
  • All object must be passed at one, you cannot add or remove single wall or no zone. You can acquire current line and zone coordinates from selected map camera entity attributes.

Examples:

  • Define virtual walls, restricted zones, and/or no mop zones
    service: dreame_vacuum.vacuum_set_restricted_zone
    data:
        walls: 
            - - 819
              - -263
              - 4424
              - 2105
        zones: 
            - - 819
              - -263
              - 4424
              - 2105
            - - -2001
              - -3050
              - -542
              - 515
        no_mops: []
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_save_temporary_map

Save newly created map. (Device ask you to do when first map is created after factory reset)

dreame_vacuum.vacuum_discard_temporary_map

Discard newly created map.

dreame_vacuum.vacuum_replace_temporary_map

Replace new map with an old one.

  • You can acquire map id from saved map camera entity attributes.
  • When multi-floor map feature is enabled map indexes may change after replacing the map. Replaced new map will always be at last available index event replaced with a lower indexed map. (More about multi-floor map support)

Example:

  • Replace new map with map with id 39
    service: dreame_vacuum.vacuum_replace_temporary_map
    data:
        map_id: 39
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_merge_segments

Merge two rooms from a map.

  • You can acquire map and segment ids from saved map camera entity attributes.
  • Rooms needs to be neighbors with each other.
  • Deleted segment ids are not used again on new created segments.
  • When multi-floor map feature is enabled selected map will change to edited map.

Examples:

  • Merge rooms 4 with 6 on the map with 63 (Room 6 will be deleted)

    service: dreame_vacuum.vacuum_replace_temporary_map
    data:
        map_id: 63
        segments: 
            - 4
            - 6
    target:
        entity_id: vacuum.vacuum
  • Merge rooms 6 with 4 on the map with 63 (Room 4 will be deleted)

    service: dreame_vacuum.vacuum_replace_temporary_map
    data:
        map_id: 63
        segments: 
            - 6
            - 4
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_split_segments

Split a map room into to different rooms.

  • You can acquire map and segment ids from saved map camera entity attributes. You can acquire line coordinates coordinates with Xiaomi Vacuum Map Card.
  • Line coordinates must cover selected room area.
  • Deleted segment ids are not used again and new segment always will be at highest next available index.
  • When multi-floor map feature is enabled selected map will change to edited map.

Example:

  • Split room 4 from line coordinates (A new room will be created and room 4 settings will set to defaults)
    service: dreame_vacuum.vacuum_replace_temporary_map
    data:
        map_id: 63
        segment: 4
        line: 
            - 819
            - -263
            - 4424
            - 2105
    target:
        entity_id: vacuum.vacuum

dreame_vacuum.vacuum_rename_segment

Set custom name for a room in current map.

  • You can acquire map and segment ids from saved map camera entity attributes.
  • Official App does not allow you to enter special characters in room name but this integration does so use this service carefully.

Example:

  • Rename room 3 to "Dining Room"
    service: dreame_vacuum.vacuum_rename_segment
    data:
        segment_id: 3
        segment_name: "Dining Room"
    target:
        entity_id: vacuum.vacuum

Other Services

Integration adds input_select services that are missing from the select entity to generated select entities for ease of use.

dreame_vacuum.select_select_first

Select first option from options list

dreame_vacuum.select_select_last

Select last option from options list

dreame_vacuum.select_select_previous

Select previous option from options list

dreame_vacuum.select_select_next

Select next option from options list

For more info about how these services are used