Vacuum Interactive Map Card

It’s here

I think you have mixed something up…

The play button that is right below the map (white one on your screenshot) should call vacuum.send_command service.

The second one (black one on your screenshot) should call vacuum.start service to start full cleaning.

Yup, exactly.

Ok, thanks a lot.
So I didn;t read, that this black “play” button always start full cleaning, where the blue one starts what is selected (zone, room, path, goto)… so I just aste your time :slight_smile: ehh… sorry :slight_smile:
So now is clear for me, but stil in docs maybe it is little confusing descrition as they don’t execute same asction…

Hi!

Thank you one million for the Card. Just started with HA yesterday.

I’m trying to integrate it with the excellent as well Roborock integration from humbertogontijo; however, I have no entity for the camera available.

Im using a S7MAXV and under the device there are 31 entities, but none are a camera or similar.

Has anyone else encountered this? I would guess I would need to ask in the Roborock integration but just in case.

Thanks in advance!

Has anyone else encountered this? I would guess I would need to ask in the Roborock integration but just in case.

Yes, but keep in mind that you have to use a custom Roborock integration, not official one.

Thanks! Yes, I think I have it ok, just the camera entity not showing up.

I’ve put a discussion on github, hopefully someone can assist

With the native Roborock integration providing a map now in 2023.12, is there a way to display this on the card?
The map shows an image-type entity .e.g. image.roborock_s6_maxv_ground_floor

You can just use it instead of camera entity, but it won’t work with anything displayed on the map.

I installed this great integration.

Now I have some questions:

Hi,

I have the problem that room/segment cleaning is not working. I have a Roborock S7 MaxV, HA core 2023.12.1 and Lovelace Vacuum Map card Version 2.2.2

So when I select the room and try to start, the vacuum won’t start.

I tried it with platform default, homeassistant-roborock and send_command.
So the debug’s :

{
  "domain": "vacuum",
  "service": "send_command",
  "serviceData": {
    "command": "app_segment_clean",
    "entity_id": "vacuum.roborock_s7_maxv_michael",
    "params": [
      {
        "segments": [
          17
        ],
        "repeat": 1
      }
    ]
  }
}

{
  "domain": "roborock",
  "service": "vacuum_clean_segment",
  "serviceData": {
    "segments": [
      "17"
    ],
    "entity_id": "vacuum.roborock_s7_maxv_michael",
    "repeats": 1
  }
}

{
  "domain": "vacuum",
  "service": "send_command",
  "serviceData": {
    "command": "app_segment_clean",
    "params": [
      "17"
    ],
    "entity_id": "vacuum.roborock_s7_maxv_michael"
  }
}

But when I start the service via HA Development

service: vacuum.send_command
target:
  entity_id: vacuum.roborock_s7_maxv_michael
data:
  command: app_segment_clean
  params: 17

or

service: roborock.vacuum_clean_segment
target:
  entity_id: vacuum.roborock_s7_maxv_michael
data:
  segments: 17

the vacuum will start cleaning.

Hopefully someone can help.

language: de

Using tiles config and setting append_tiles: true

Which integration do you use in HA to add your vacuum?

hallo and thanks.

the Langueage now working.

But I have a question fot the seeting up room cleaning.

In the example code

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points
      - rooms

is the xiaomi vacuum, but I have an ecovacs vaccuum.
Must I also right the full code? And where I get the token?

And must i put this code in the normal config.yaml?

For my vaccum I use this Hacs intergration:

Ok, the link I have posted doesn’t apply to your integration.

You have to create rooms config manually. Rooms will be cleaned using room IDs, you have to find out which id corresponds to which room (this info should be in rooms attribute of vacuum entity). To get values for outline follow these instructions.

Example:

map_modes:
  - ...
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 14
        outline: [[ 214, 321 ], [ 242, 321 ], [ 241, 274 ], [ 231, 274 ]]
        label:
          text: "Bedroom"
          x: 229
          y: 303
          offset_y: 35
        icon:
          name: "mdi:bed"
          x: 229
          y: 303
      - id: 19
        outline: [[ 214, 272 ], [ 230, 272 ], [ 230, 256 ], [ 214, 256 ]]
        label:
          text: "Bathroom"
          x: 222
          y: 264
          offset_y: 35
        icon:
          name: "mdi:shower"
          x: 22282
          y: 26496

Thanks for the new info.

I test it with the first room.

If I klick on the + se the roomlines und klick then on play for 1 secound I see this:

But now I don´t know how to set the outline correct, because I need two numbers per point. But in the screenshot I online see ones.
outline: [[ 214, 321 ], [ 242, 321 ], [ 241, 274 ], [ 231, 274 ]]

Edit:
Now I got it with try an error :see_no_evil:

Thanks for the updated integration, I can add the new Roborock map image now.
For anyone else trying this, you need to upgrade to 2.8.0 of the integration.

  • add image entities as map entities (15353d3)

Hi,

I m using the Roborock Integration for HomeAssistant from humbertogontijo version 1.0.13

Can you post your card config?

That is my config at the moment:

type: custom:xiaomi-vacuum-map-card
debug: true
title: ''
preset_name: Wohnung Michael
entity: vacuum.roborock_s7_maxv_michael
map_source:
  camera: camera.roborock_s7_maxv_michael_map
calibration_source:
  camera: true
vacuum_platform: humbertogontijo/homeassistant-roborock
map_modes:
  - template: vacuum_clean_zone
  - template: vacuum_goto
  - template: vacuum_clean_segment
    predefined_selections:
      - id: '16'
        icon:
          name: mdi:broom
          x: 32550
          'y': 24000
        label:
          text: Room 16
          x: 32550
          'y': 24000
          offset_y: 35
        outline:
          - - 29800
            - 21800
          - - 35300
            - 21800
          - - 35300
            - 26200
          - - 29800
            - 26200
      - id: '17'
        icon:
          name: mdi:broom
          x: 27150
          'y': 24500
        label:
          text: Room 17
          x: 27150
          'y': 24500
          offset_y: 35
        outline:
          - - 24500
            - 22150
          - - 29800
            - 22150
          - - 29800
            - 26850
          - - 24500
            - 26850
      - id: '18'
        icon:
          name: mdi:broom
          x: 26225
          'y': 30600
        label:
          text: Room 18
          x: 26225
          'y': 30600
          offset_y: 35
        outline:
          - - 25100
            - 30200
          - - 27350
            - 30200
          - - 27350
            - 31000
          - - 25100
            - 31000
      - id: '19'
        icon:
          name: mdi:broom
          x: 26900
          'y': 32400
        label:
          text: Room 19
          x: 26900
          'y': 32400
          offset_y: 35
        outline:
          - - 25550
            - 31400
          - - 28250
            - 31400
          - - 28250
            - 33400
          - - 25550
            - 33400
      - id: '20'
        icon:
          name: mdi:broom
          x: 27450
          'y': 35100
        label:
          text: Room 20
          x: 27450
          'y': 35100
          offset_y: 35
        outline:
          - - 24650
            - 33750
          - - 30250
            - 33750
          - - 30250
            - 36450
          - - 24650
            - 36450
      - id: '21'
        icon:
          name: mdi:broom
          x: 29300
          'y': 30300
        label:
          text: Room 21
          x: 29300
          'y': 30300
          offset_y: 35
        outline:
          - - 27400
            - 26900
          - - 31200
            - 26900
          - - 31200
            - 33700
          - - 27400
            - 33700
      - id: '22'
        icon:
          name: mdi:broom
          x: 32725
          'y': 34925
        label:
          text: Room 22
          x: 32725
          'y': 34925
          offset_y: 35
        outline:
          - - 30250
            - 33850
          - - 35200
            - 33850
          - - 35200
            - 36000
          - - 30250
            - 36000
      - id: '23'
        icon:
          name: mdi:broom
          x: 32825
          'y': 29225
        label:
          text: Room 23
          x: 32825
          'y': 29225
          offset_y: 35
        outline:
          - - 30500
            - 28150
          - - 35150
            - 28150
          - - 35150
            - 30300
          - - 30500
            - 30300
      - id: '24'
        icon:
          name: mdi:broom
          x: 32875
          'y': 26875
        label:
          text: Room 24
          x: 32875
          'y': 26875
          offset_y: 35
        outline:
          - - 30400
            - 25850
          - - 35350
            - 25850
          - - 35350
            - 27900
          - - 30400
            - 27900
append_icons: false
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: cleaning
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: error
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: mdi:pause
    conditions:
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: docked
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: idle
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: error
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: mdi:stop
    conditions:
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: docked
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: idle
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: error
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: paused
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: docked
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: returning
    tooltip: Zurück zur Station
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: mdi:target-variant
    conditions:
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: docked
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: error
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: cleaning
      - entity: vacuum.roborock_s7_maxv_michael
        value_not: returning
    tooltip: Punktreinigung
    tap_action:
      action: call-service
      service: vacuum.clean_spot
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: mdi:map-marker
    tooltip: Lokalisieren
    tap_action:
      action: call-service
      service: vacuum.locate
      service_data:
        entity_id: vacuum.roborock_s7_maxv_michael
  - icon: fapro:water-fan
    tooltip: Kombiniert
    tap_action:
      action: call-service
      service: script.roborock_programm_kombiniert
  - icon: mdi:fan-alert
    tooltip: Saugen
    tap_action:
      action: call-service
      service: script.roborock_programm_saugen
  - icon: mdi:water-alert
    tooltip: Wischen
    tap_action:
      action: call-service
      service: script.roborock_programm_wischen
  - icon: mdi:alpha-c-circle
    tooltip: Individuel
    tap_action:
      action: call-service
      service: script.roborock_programm_custom
  - type: menu
    menu_id: fan_speed
    icon_id: fan_speed
    entity: select.fanspeed
    available_values_attribute: options
    icon: mdi:fan
    icon_mapping:
      'off': mdi:fan-off
      quiet: mdi:fan-speed-1
      balanced: mdi:fan-speed-1
      turbo: mdi:fan-speed-2
      max: mdi:fan-speed-3
      custom: mdi:fan-auto
      max_plus: mdi:fan-plus
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: '[[value]]'
        entity_id: '[[entity_id]]'
  - type: menu
    menu_id: water_box_mode
    icon_id: water_box_mode
    entity: select.roborock_s7_maxv_michael_wischmopp_intensiat
    available_values_attribute: options
    icon: mdi:water
    icon_mapping:
      'off': mdi:water-remove
      mild: mdi:water-minus
      moderate: mdi:water
      intense: mdi:water-plus
      custom: mdi:water-sync
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: '[[value]]'
        entity_id: '[[entity_id]]'
  - type: menu
    menu_id: mop_mode
    icon_id: mop_mode
    entity: select.roborock_s7_maxv_michael_route
    available_values_attribute: options
    icon: mdi:view-grid-outline
    icon_mapping:
      standard: mdi:view-grid-outline
      deep: mdi:view-grid
      deep_plus: mdi:view-grid-plus
      custom: mdi:view-dashboard-edit-outline
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: '[[value]]'
        entity_id: '[[entity_id]]'
  - icon: mdi:remote
    tooltip: Individuel
    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.sequence
        data:
          sequence:
            - service: browser_mod.popup
              data:
                deviceID: this
                title: Roborock
                content:
                  square: false
                  type: grid
                  columns: 1
                  cards:
                    - type: custom:webrtc-camera
                      url: Roborock_Michael2
                    - square: false
                      type: horizontal-stack
                      colums: 4
                      cards:
                        - entity: input_boolean.roborock_move_up
                          name: Vor
                          icon: mdi:arrow-up-bold
                          type: custom:button-card
                          hold_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_move
                            data:
                              velocity: 0.29
                              duration: 600
                              rotation: 0
                            repeat: 600
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
                        - entity: input_boolean.roborock_move_down
                          name: Zurück
                          icon: mdi:arrow-down-bold
                          type: custom:button-card
                          hold_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_move
                            data:
                              velocity: -0.29
                              duration: 600
                              rotation: 0
                            repeat: 600
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
                        - entity: input_boolean.roborock_move_left
                          name: Links
                          icon: mdi:arrow-left-bold
                          type: custom:button-card
                          hold_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_move
                            data:
                              velocity: 0.03
                              rotation: 10
                              duration: 600
                            repeat: 600
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
                        - entity: input_boolean.roborock_move_right
                          name: Rechts
                          icon: mdi:arrow-right-bold
                          type: custom:button-card
                          hold_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_move
                            data:
                              velocity: 0.03
                              rotation: -10
                              duration: 600
                            repeat: 600
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
                    - square: false
                      type: horizontal-stack
                      colums: 2
                      cards:
                        - entity: input_boolean.roborock_move_up
                          name: Start
                          icon: mdi:play
                          type: custom:button-card
                          tap_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_start
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
                        - entity: input_boolean.roborock_move_up
                          name: Stop
                          icon: mdi:stop
                          type: custom:button-card
                          tap_action:
                            action: call-service
                            service: roborock.vacuum_remote_control_stop
                            target:
                              entity_id: vacuum.roborock_s7_maxv_michael
append_tiles: true
tiles:
  - entity: vacuum.roborock_s7_maxv_michael
    attribute: mop_intensity
    label: Aktuelle Intensität
    icon: mdi:water
  - entity: vacuum.roborock_s7_maxv_michael
    attribute: mop_mode
    label: Aktuelle Strecke
    icon: mdi:view-grid-outline
  - entity: sensor.roborock_s7_maxv_michael_aktuelle_reinigung_dauer
    label: Aktuelle Zeit
    icon: mdi:timer-sand
  - entity: sensor.roborock_s7_maxv_michael_aktuelle_reinigung_flache
    label: Aktuelle Fläche
    icon: mdi:texture-box
  - entity: sensor.roborock_s7_maxv_michael_aktueller_raum
    label: Aktueller Raum
    icon: mdi:floor-plan
  - entity: sensor.roborock_s7_maxv_michael_aktueller_raum
    label: Aktueller Raum
    icon: mdi:floor-plan

Use following config:

type: custom:xiaomi-vacuum-map-card
debug: true
title: ''
preset_name: Wohnung Michael
entity: vacuum.roborock_s7_maxv_michael
map_source:
  camera: camera.roborock_s7_maxv_michael_map
calibration_source:
  camera: true
vacuum_platform: humbertogontijo/homeassistant-roborock
map_modes:
  - template: vacuum_clean_zone
  - template: vacuum_goto
  - template: vacuum_clean_segment
    id_type: "number"
    predefined_selections:
       ...

I tested my room layout today.

Here is part of the folder:

You can see that I clicked on the bedroom. Then I clicked on the play button at the bottom right. My vacuum robot moved out of the charging station, about 1/2 m, then it stopped there and cleaned on the spot until I stopped it.

This is my card code:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.anneliese
title: ''
vacuum_platform: DeebotUniverse/Deebot-4-Home-Assistant
map_locked: true
map_source:
  camera: image.anneliese_karte
two_finger_pan: false
language: de
map_modes:
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 1
        outline:
          - - 3400
            - -20000
          - - -6400
            - -20000
          - - -6400
            - -6000
          - - 3500
            - -6000
        label:
          text: Schlafzimmer
          x: -1500
          'y': -13000
          offset_y: 35
        icon:
          name: mdi:bed
          x: -1500
          'y': -13000
      - id: 2
        outline:
          - - -15000
            - -20000
          - - -6400
            - -20000
          - - -6400
            - -9000
          - - -15000
            - -9000
        label:
          text: Küche
          x: -9500
          'y': -17000
          offset_y: 35
        icon:
          name: hue:room-kitchen
          x: -9500
          'y': -17000
      - id: 3
        outline:
          - - -19800
            - -18500
          - - -15000
            - -18500
          - - -15000
            - -11500
          - - -19800
            - -11500
        label:
          text: Bad
          x: -17500
          'y': -16000
          offset_y: 35
        icon:
          name: hue:room-toilet
          x: -17500
          'y': -16000
      - id: 4
        outline:
          - - -13000
            - -9000
          - - -6400
            - -9000
          - - -6400
            - -1700
          - - -13000
            - -1700
        label:
          text: Flur
          x: -9500
          'y': -6000
          offset_y: 35
        icon:
          name: mdi:alpha-f-box
          x: -9500
          'y': -6000
      - id: 5
        outline:
          - - -20000
            - -1700
          - - -6400
            - -1700
          - - -6400
            - 10000
          - - -19800
            - 10000
        label:
          text: Wohnzimmer
          x: -12500
          'y': 5000
          offset_y: 35
        icon:
          name: mdi:sofa
          x: -12500
          'y': 5000
      - id: 6
        outline:
          - - 3400
            - -6000
          - - -6400
            - -6000
          - - -6400
            - 8500
          - - 3500
            - 8500
        label:
          text: Büro
          x: -1500
          'y': 2000
          offset_y: 35
        icon:
          name: mdi:bookshelf
          x: -1500
          'y': 2000

Do I have to add anything else so that when I click on the room it goes to it and vacuums it?

Maybe I misunderstood something here with the room IDs. I have now simply numbered the rooms in my card.