Vacuum Interactive Map Card

@BeastHouse I’m from Poland, it’s not so bad. You can check out this thread:

1 Like

Thanks @3_14 - Managed to add my current floor, however I am guessing the map will change like the Live Map. Are you required to have an image as map_source instead of a camera?

Here is what I have so far:

And the code:

cards:
  - type: custom:xiaomi-vacuum-map-card
    title: Xiaomi Vacuum Map Card
    preset_name: Live map
    entity: vacuum.roborock_s6_maxv
    map_source:
      camera: camera.xiaomi_cloud_map_extractor
    calibration_source:
      camera: true
    map_modes:
      - template: vacuum_clean_zone
      - template: vacuum_clean_zone_predefined
        predefined_selections:
          - zones:
              - - 29218
                - 25397
                - 32728
                - 28231
            label:
              text: Kitchen
              x: 30990
              'y': 26699
              offset_y: 35
            icon:
              name: mdi:countertop
              x: 30990
              'y': 26699
          - zones:
              - - 24417
                - 25414
                - 29258
                - 28044
              - - 24450
                - 28062
                - 26301
                - 29375
            label:
              text: Kitchen 2
              x: 27230
              'y': 26511
              offset_y: 35
            icon:
              name: mdi:countertop
              x: 27230
              'y': 26511
          - zones:
              - - 29048
                - 28386
                - 33668
                - 33202
            label:
              text: Dining
              x: 32887
              'y': 30100
              offset_y: 35
            icon:
              name: mdi:table-chair
              x: 32887
              'y': 30100
          - zones:
              - - 29203
                - 33308
                - 31925
                - 34928
              - - 29271
                - 34846
                - 30215
                - 37816
            label:
              text: Hallway
              x: 31280
              'y': 33929
              offset_y: 35
            icon:
              name: mdi:countertop
              x: 31280
              'y': 33929
          - zones:
              - - 30244
                - 35102
                - 32761
                - 35919
            label:
              text: Powder Room
              x: 32596
              'y': 35279
              offset_y: 35
            icon:
              name: mdi:countertop
              x: 32596
              'y': 35279
          - zones:
              - - 24534
                - 35445
                - 29018
                - 37937
              - - 26908
                - 33104
                - 29051
                - 35408
            label:
              text: Master Bedroom
              x: 28016
              'y': 36133
              offset_y: 35
            icon:
              name: mdi:countertop
              x: 28016
              'y': 36133
          - zones:
              - - 24584
                - 33634
                - 26795
                - 35289
            label:
              text: Ensuite
              x: 26495
              'y': 34014
              offset_y: 35
            icon:
              name: mdi:table-chair
              x: 26495
              'y': 34014
      - template: vacuum_goto
      - template: vacuum_follow_path
    additional_presets:
      - preset_name: Family Room
        entity: vacuum.roborock_s6_maxv
        map_source:
          camera: camera.xiaomi_cloud_map_extractor
        calibration_source:
          camera: true
        append_icons: true
        icons:
          - icon: mdi:home-floor-1
            tooltip: Family Room
            tap_action:
              action: call-service
              service: vacuum.send_command
              service_data:
                entity_id: vacuum.roborock_s6_maxv
                command: load_multi_map
                params: 0
        map_modes:
          - template: vacuum_clean_zone
          - template: vacuum_clean_zone_predefined
            predefined_selections:
              - zones:
                  - - 27500
                    - 27500
                    - 28500
                    - 28500
          - template: vacuum_goto
    card_mod:
      style: |
        ha-card {
          background-color: var(--primary-background-color);
          background: rgb(0, 49, 83, 0.4);
          box-shadow: none;
          }

The map extractor should automatically switch to current floor.

Hi, @3_14 !
Can you please elaborate on how do I fill the “outside” part of the map please? I couldn’t find the CSS command that does change this.

Kudos for the good works and thanks!

That’s because it is not a functionality of map card (and therefore not CSS as well), but map extractor:

1 Like

Thanks, I have 4 ‘levels’ in my house, am I able to add that many? Kinda struggling with this one.

Hi,
this card is awesome and is very usefull, great work.

I can almost ditch the app the only thing missing:

  • Resetting the filters/brushes when they have been replaced by long pressing the info tab for example
  • When I haven’t open the lid for a while and that i have to empty the bin. I could have a binary sensor set to 1. I could than automate a notificaion

Are these functions something that could be added?

You can do as many as you want to :slight_smile:

1 Like
  • It’s possible to do it, but you have to override default tiles
  • As far I understand this functionality has to be provided by the integration…?

Thanks a lot for your fast answer! So, “color_scan” did the job :smile:

Thanx I was able to figure this out, just sharing in case this may help someone:


    hold_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: reset_consumable
        params: filter_work_time

It most probably should be part of the integration, I am unable to figure out if there is something showing if the bin is full, will continue searching.

1 Like

How can I eliminate this kind of “overflowing”?

You can’t

So it is designed by HA latest versions :slight_smile:

1 Like

I recreated the look of the card which i like but with the hold-action to reset the filters. Here is the complete code I wrote. (might help sommeone).

Is there a way to have a dynamic icon for the battery like it’s the case in the default setup?

tiles:
  - label: Status
    entity: vacuum.roborock_s6_maxv
    attribute: status
    icon: mdi:robot-vacuum
  - label: Battery
    entity: vacuum.roborock_s6_maxv
    attribute: battery_level
    unit: '%'
    icon: mdi:battery
  - label: Fan speed
    entity: vacuum.roborock_s6_maxv
    attribute: fan_speed
    icon: mdi:fan
  - label: Sensor left
    entity: sensor.roborock_s6_maxv_sensor_dirty_left
    multiplier: 0.0002777777777777778
    unit: h
    icon: mdi:eye-outline
    precision: 1
    hold_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: reset_consumable
        params: sensor_dirty_time
  - label: Filter left
    entity: sensor.roborock_s6_maxv_filter_left
    multiplier: 0.0002777777777777778
    unit: h
    icon: mdi:air-filter
    precision: 1
    hold_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: reset_consumable
        params: filter_work_time
  - label: Main brush left
    entity: sensor.roborock_s6_maxv_main_brush_left
    multiplier: 0.0002777777777777778
    unit: h
    icon: mdi:brush
    precision: 1
    hold_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: reset_consumable
        params: main_brush_work_time
  - label: Side brush left
    entity: sensor.roborock_s6_maxv_side_brush_left
    multiplier: 0.0002777777777777778
    unit: h
    icon: mdi:brush
    precision: 1
    hold_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: reset_consumable
        params: side_brush_work_time
2 Likes

Nicely done :+1: You can also double-click “play” button to retrieve autogenerated config, it will be printed in browser’s console (it is almost exactly the same as your, the only thing that is missing are translations, but they are not required for English :wink: )

Currently it’s not possible to have a dynamic icon, but I plan to add this feature

2 Likes

I like your approach :smiley:

1 Like

What’s the best way to have this card display the map of a valetudo robot?
Still ICantBelieveItsNotValetudo?

Yup, I don’t really want to parse raw map data…

You can check out this issue: