Vacuum Interactive Map Card

It means that the map has been shifted, you have to adjust zones.


You can change font size by adding following properties to your theme:

map-card-manual-rectangle-description-font-size
map-card-predefined-rectangle-label-font-size
map-card-room-label-font-size
map-card-predefined-point-label-font-size

To change font size you have to use card mod and apply appropriate style to .label-text class


No, this is a value of state attribute of vacuum entity, it is always set to “Charging” when the vacuum is docked

@3_14 Thanks. I was all set but the map shifted again. Is that common/stoppable?

it usually happens when you move the docking station or change something in the room layout

I just added this card and works fine with xiaomi Mijia 1s, i love it!

I have a question:
My vacuum never stuck in rug till i use this cards, It seems less “smart” with carpet than xiaomi home app. I have to remove the rug because 100% it stuck in it ( wheels slip on the floor)
Is it possible? There is a fix(options to set)?

Thank you Piotr!

I don’t think it is possible that your problem is related to the card…

2 Likes

I know that seems strange but…i will try to explain myself:
Mijia vacuum 1s had some limitation in Xiaomi home: never had “clean zone” and never had “clean x2 or x3” but now ,with this card, it is possible and it works! it could not be possible that some “command set” are different from “custom command” xiaomi home?

I don’t think so, but I’m not sure.

Is there an easy way to turn the auto generate room config to map the rooms correctly. Currently just big boxes around the rooms.

You have to change outline configuration for every room that you want to adjust.

So kind of draw a number of boxes around the area and take all those coordinates? Sorry just a bit confussed by the instructions, which im sure is me being stupid.

Choose appropriate mode from dropdown according to desired shape

  • Zone → “Zone cleanup”
  • Point → “Pin & Go”
  • Outline → “Path”

Selecting a “Path” option will create a list of pairs which can be used as an outline

For things like Sensors, Filter, Main Brush, and Side Brush, my vacuum supplies attributes for both hours and percentage. The card seems to be picking up the percentage attribute, but using hours as the unit. What’s the simplest way to correct this?

Which integration do you use? Please attach your card config

I’m using the Dreame integration (GitHub - Tasshack/dreame-vacuum: Home Assistant integration for Dreame Gen2 Lidar robot vacuums with map support) and here is my config:

type: custom:xiaomi-vacuum-map-card
vacuum_platform: default
entity: vacuum.dreamebot_d10_plus
map_source:
  camera: camera.dreamebot_d10_plus_map
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:
      - id: 1
        outline:
          - - -750
            - 3600
          - - -750
            - 5800
          - - 1850
            - 5800
          - - 1850
            - 3600
      - id: 2
        outline:
          - - -7800
            - 2500
          - - -7800
            - 5950
          - - -4700
            - 5950
          - - -4700
            - 2500
      - id: 3
        outline:
          - - -8050
            - -1250
          - - -8050
            - 2500
          - - -1100
            - 2500
          - - -1100
            - -1250
      - id: 4
        outline:
          - - -1200
            - -1250
          - - -1200
            - 2200
          - - 1950
            - 2200
          - - 1950
            - -1250
      - id: 5
        outline:
          - - 400
            - 1350
          - - 400
            - 3150
          - - 2000
            - 3150
          - - 2000
            - 1350
      - id: 6
        outline:
          - - -4700
            - 2200
          - - -4700
            - 5300
          - - 400
            - 5300
          - - 400
            - 2200
  - 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]]'

Try the following config instead:

type: custom:xiaomi-vacuum-map-card
vacuum_platform: Tasshack/dreame-vacuum
entity: vacuum.dreamebot_d10_plus
map_source:
  camera: camera.dreamebot_d10_plus_map
calibration_source:
  camera: true
map_modes:
  - template: vacuum_clean_zone
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 1
        outline:
          - - -750
            - 3600
          - - -750
            - 5800
          - - 1850
            - 5800
          - - 1850
            - 3600
      - id: 2
        outline:
          - - -7800
            - 2500
          - - -7800
            - 5950
          - - -4700
            - 5950
          - - -4700
            - 2500
      - id: 3
        outline:
          - - -8050
            - -1250
          - - -8050
            - 2500
          - - -1100
            - 2500
          - - -1100
            - -1250
      - id: 4
        outline:
          - - -1200
            - -1250
          - - -1200
            - 2200
          - - 1950
            - 2200
          - - 1950
            - -1250
      - id: 5
        outline:
          - - 400
            - 1350
          - - 400
            - 3150
          - - 2000
            - 3150
          - - 2000
            - 1350
      - id: 6
        outline:
          - - -4700
            - 2200
          - - -4700
            - 5300
          - - 400
            - 5300
          - - 400
            - 2200
  - template: vacuum_clean_spot

I have a Roborock S6 and I cannot select “Path”. Is this only the case with newer Roborock models?

If yes, how can I set the coordinates of the rooms without zones?

Using the camera for valetudo vacuums the calibrations data are automatically provided to the card of @3_14 this probably can be the easy way to use valetudo vacuums in home assistant.

2 Likes

Definitely! I didn’t know this integration

Dear Piotr, this valetudo camera was inspired by your outstanding work linking and trying supporting the best vacuum card ever made for HA (yours) to this modest project of mine. I do really appreciate your work and I would really wish we could somehow cooperate with you. I guess anyhow we could move this discussion on on appropriate channels. Thanks for your great work.

1 Like

Hello @3_14 ,

How can I zoom my map automaticly ? I need to x2 to be correct all time.

Thanks you