Vacuum Interactive Map Card

Hi All,

I wanna create a automation where my S8 moves to a specific coordinate in the house when the watertank is empty. Most of the time i see a notification but forget it.

Now it will stand in the middle of the hallway and i know my S8 have a urgent question :slight_smile:

On the card i can point a location to move the S8 to it. But how do i know the coordinates for that point so i can add them in the action:

action: roborock.vacuum_goto
target:
  entity_id: vacuum.roborock_s8
data:
  x_coord: "123"
  y_coord: "456"

Hi all,
is it possible to create a button in map_mode to clean the whole house?
I’m trying something like this but not works:

thanks

@poudenes
Open card editor and select a desired point on the map. Coordinates should be shown in the editor

@19Francesco81 it is not possible to add service calls to map_modes menu. You can do it for icons and tiles (appropriate icon should be available out of the box).

1 Like

Thank you!

ok, but what if I wanted to select the whole house?
In the shortcuts all= segment_id: -1.
Unfortunately not work

You can just start cleaning, it should clean the whole house by default.

Thanks for the quick reply :slight_smile: We are going round in circles. My problem is that my elderly mother has been pressing the default start for room cleaning multiple times so I found a way, creating two map_modes:

  • clean room select
  • all home select

using only the “big blue” button to start both room cleaning and all home cleaning.
Is there a way or should I give up?

Can you show your card? I might have some ideas

Certainly!

this is my code.
I used the condition “entity: vacuum.l20_ultra_complete - value_not: docked” to prevent my mother from using it :slight_smile: , but I no longer have a button to start the total cleaning

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.l20_ultra_complete_map
calibration_source:
  camera: true
entity: vacuum.l20_ultra_complete
vacuum_platform: Tasshack/dreame-vacuum    
append_icons: false
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: docked
      - entity: vacuum.l20_ultra_complete
        value_not: cleaning
      - entity: vacuum.l20_ultra_complete
        value_not: error
      - entity: vacuum.l20_ultra_complete
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.l20_ultra_complete
  - icon: mdi:pause
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: docked
      - entity: vacuum.l20_ultra_complete
        value_not: idle
      - entity: vacuum.l20_ultra_complete
        value_not: error
      - entity: vacuum.l20_ultra_complete
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.l20_ultra_complete
  - icon: mdi:stop
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: docked
      - entity: vacuum.l20_ultra_complete
        value_not: idle
      - entity: vacuum.l20_ultra_complete
        value_not: error
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.l20_ultra_complete
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: docked
      - entity: vacuum.l20_ultra_complete
        value_not: returning
    tooltip: Return to base
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.l20_ultra_complete
  - icon: mdi:map-marker
    tooltip: Locate
    tap_action:
      action: call-service
      service: vacuum.locate
      service_data:
        entity_id: vacuum.l20_ultra_complete
  - type: menu
    menu_id: Genius
    entity: select.l20_ultra_complete_cleangenius
    available_values_attribute: options
    icon_mapping:
      "off": mdi:atom
      routine_cleaning: mdi:atom
      deep_cleaning: mdi:atom
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: "[[value]]"
        entity_id: "[[entity_id]]"
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: cleaning
      - entity: vacuum.l20_ultra_complete
        value_not: error
      - entity: vacuum.l20_ultra_complete
        value_not: returning
  - type: menu
    menu_id: Modalità di Pulizia
    entity: select.l20_ultra_complete_cleaning_mode
    available_values_attribute: options
    icon_mapping:
      sweeping: mdi:broom
      mopping: mdi:broom
      sweeping_and_mopping: mdi:broom
      mopping_after_sweeping: mdi:broom
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: "[[value]]"
        entity_id: "[[entity_id]]"
    conditions:
      - entity: vacuum.l20_ultra_complete
        value_not: cleaning
      - entity: vacuum.l20_ultra_complete
        value_not: error
      - entity: vacuum.l20_ultra_complete
        value_not: returning
  - type: menu
    menu_id: Fan Speed
    entity: select.l20_ultra_complete_suction_level
    available_values_attribute: options
    icon_mapping:
      quiet: mdi:fan
      standard: mdi:fan-speed-1
      strong: mdi:fan-speed-2
      turbo: mdi:fan-speed-3
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: "[[value]]"
        entity_id: "[[entity_id]]"
  - entity: switch.l20_ultra_complete_max_suction_power
    icon: mdi:weather-windy
    tap_action:
      action: toggle
    conditions:
      - entity: switch.l20_ultra_complete_max_suction_power
        value_not: unavailable
  - type: menu
    menu_id: Percorso di Pulizia
    entity: select.l20_ultra_complete_cleaning_route
    available_values_attribute: options
    icon_mapping:
      quick: mdi:sine-wave
      standard: mdi:sine-wave
      intensive: mdi:sine-wave
      deep: mdi:sine-wave
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: "[[value]]"
        entity_id: "[[entity_id]]"
  - menu_id: Umidità dei Moci
    icon: mdi:water
    label: Asciutto
    conditions:
      - entity: vacuum.l20_ultra_complete
        attribute: mop_pad_humidity
        value: Slightly dry
      - entity: number.l20_ultra_complete_wetness_level
        value_not: unavailable
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        entity_id: select.l20_ultra_complete_mop_pad_humidity
        option: slightly_dry
  - menu_id: Umidità dei Moci
    icon: mdi:water
    label: Umido
    conditions:
      - entity: vacuum.l20_ultra_complete
        attribute: mop_pad_humidity
        value: Moist
      - entity: number.l20_ultra_complete_wetness_level
        value_not: unavailable
    tap_action:
      action: call-service
      service: number.set_value
      service_data:
        entity_id: number.l20_ultra_complete_wetness_level
        value: 20
  - menu_id: Umidità dei Moci
    icon: mdi:water
    label: Bagnato
    conditions:
      - entity: vacuum.l20_ultra_complete
        attribute: mop_pad_humidity
        value: Wet
      - entity: number.l20_ultra_complete_wetness_level
        value_not: unavailable
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        entity_id: select.l20_ultra_complete_mop_pad_humidity
        option: wet
map_modes:
  - template: vacuum_clean_segment
    predefined_selections:
      - id: "1"
        icon:
          name: mdi:sofa-outline
          x: 4650
          "y": 7700
        label:
          text: Soggiorno
          x: 4650
          "y": 7700
          offset_y: 30
        outline:
          - - 1650
            - 6100
          - - 7850
            - 6100
          - - 7850
            - 9800
          - - 1650
            - 9800
      - id: "2"
        icon:
          name: mdi:home-outline
          x: 200
          "y": 7900
        label:
          text: Tavernetta
          x: 200
          "y": 7900
          offset_y: 30
        outline:
          - - -1150
            - 6300
          - - 1650
            - 6300
          - - 1650
            - 9750
          - - -1150
            - 9750
      - id: "4"
        icon:
          name: mdi:foot-print
          x: 8500
          "y": 4900
        label:
          text: Corridoio
          x: 8500
          "y": 4700
          offset_x: -50
        outline:
          - - 3100
            - 4050
          - - 9250
            - 4050
          - - 9250
            - 7550
          - - 7850
            - 7550
          - - 7850
            - 5200
          - - 3100
            - 5200
      - id: "5"
        icon:
          name: mdi:home-outline
          x: 10000
          "y": 8850
        label:
          text: Ingresso
          x: 10000
          "y": 8850
          offset_y: 30
        outline:
          - - 7850
            - 7550
          - - 12100
            - 7550
          - - 12100
            - 10050
          - - 7850
            - 10050
      - id: "6"
        icon:
          name: mdi:chef-hat
          x: 10400
          "y": 4700
        label:
          text: Cucina
          x: 10400
          "y": 4700
          offset_y: 30
        outline:
          - - 9400
            - 2100
          - - 11750
            - 2100
          - - 11750
            - 7550
          - - 9400
            - 7550
      - id: "7"
        icon:
          name: mdi:toilet
          x: 3950
          "y": 2000
        label:
          text: Bagno
          x: 3950
          "y": 2000
          offset_y: 30
        outline:
          - - 3150
            - -50
          - - 4800
            - -50
          - - 4800
            - 4050
          - - 3150
            - 4050
      - id: "8"
        icon:
          name: mdi:bed-outline
          x: 7000
          "y": 2000
        label:
          text: Camera Bambini
          x: 7000
          "y": 2000
          offset_y: 30
        outline:
          - - 4950
            - -300
          - - 9350
            - -300
          - - 9350
            - 4050
          - - 4950
            - 4050
      - id: "9"
        icon:
          name: mdi:toilet
          x: 2300
          "y": 950
        label:
          text: Bagnetto
          x: 2300
          "y": 950
          offset_y: 30
        outline:
          - - 1700
            - -300
          - - 2950
            - -300
          - - 2950
            - 2150
          - - 1700
            - 2150
      - id: "10"
        icon:
          name: mdi:bed-outline
          x: 1200
          "y": 3450
        label:
          text: Camera
          x: 1200
          "y": 3450
          offset_y: 30
        outline:
          - - -950
            - -300
          - - 1500
            - -300
          - - 1500
            - 2300
          - - 3000
            - 2300
          - - 3000
            - 5200
          - - -950
            - 5200
  - template: vacuum_clean_zone
map_locked: true
tiles:
  - tile_id: status
    precision: 0
    entity: vacuum.l20_ultra_complete
    label: Stato
    attribute: status
    icon: mdi:robot-vacuum
    translations:
      sleeping: Dormendo
      starting: Avvio
      charger disconnected: Caricabatterie scollegato
      idle: Riposo
      remote control active: Controllo remoto attivo
      cleaning: Pulizia
      returning home: Ritorno alla base
      manual mode: Modalità Manuale
      charging: In carica
      charging problem: Problema di ricarica
      paused: Pausa
      spot cleaning: Pulizia a punti
      error: Errore
      shutting down: Spegnimento
      updating: Aggiornamento in corso
      docking: In base
      going to target: Andando al punto
      zoned cleaning: Pulizia a zone
      segment cleaning: Pulizia stanze
      emptying the bin: Svuotare il contenitore
      charging complete: Carica Completata
      device offline: Device offline
  - tile_id: battery_level
    entity: vacuum.l20_ultra_complete
    precision: 0
    label: Batteria
    attribute: battery_level
    icon_source: vacuum.l20_ultra_complete.attributes.battery_icon
    unit: "%"
  - tile_id: cleaned_area
    attribute: cleaned_area
    label: Area pulita
    icon: mdi:ruler-square
    unit: m²
    entity: vacuum.l20_ultra_complete
    precision: 0
    translations: null
  - tile_id: cleaning_time
    attribute: cleaning_time
    label: Tempo di pulizia
    icon: mdi:timer-sand
    unit: min
    entity: vacuum.l20_ultra_complete
    precision: 0
    translations: null
  - tile_id: cleaning_count
    attribute: cleaning_count
    label: Conteggio pulizia
    icon: mdi:counter
    unit: x
    entity: vacuum.l20_ultra_complete
    precision: 0
    translations: null
  - tile_id: total_cleaned_area
    attribute: total_cleaned_area
    label: Area totale pulita
    icon: mdi:set-square
    unit: m²
    entity: vacuum.l20_ultra_complete
    precision: 0
    translations: null
  - tile_id: detergente
    label: Detergente
    unit: "%"
    entity: sensor.l20_ultra_complete_detergent_left
    precision: 0
    translations: null
  - tile_id: filtro
    label: Filtro
    unit: "%"
    entity: sensor.l20_ultra_complete_filter_left
    precision: 0
    translations: null
  - tile_id: spazzola centrale
    label: Spazzola Centrale
    unit: "%"
    entity: sensor.l20_ultra_complete_main_brush_left
    precision: 0
    translations: null
  - tile_id: Panni di pulizia
    label: Panni di pulizia
    unit: "%"
    entity: sensor.l20_ultra_complete_mop_pad_left
    precision: 0
    translations: null
  - tile_id: sensori
    label: Sensori
    unit: "%"
    entity: sensor.l20_ultra_complete_sensor_dirty_left
    precision: 0
    translations: null
  - tile_id: spazzola laterale
    label: Spazzola Laterale
    unit: "%"
    entity: sensor.l20_ultra_complete_side_brush_left
    precision: 0
    translations: null

@19Francesco81 Unfortunately it is not possible to start cleaning using the default button when there’s no selection made on the map. :frowning:

What is possible:

  1. Change the color of the original “clean everything” button:
  2. Start full cleaning after selecting clicking the map and then the “big blue” buton
  3. The same as above, but without need for clicking the button (cleaning will start immediately after clicking on the map)

Would any of these ideas be ok for you?

wonderful!!!here we are :smiley:
My previous posts asked about the possibility of using your option 2.
I click 1 time the map and then the “big blue” button
I was testing this code but I can’t get it to run, but maybe i fail anythings

  - template: vacuum_clean_segment
    name: Pulizia Casa
    predefined_selections:
      - id: ???? (what is the id of the all house)
        icon:
          name: mdi:home
          x: 5500
          "y": 5700
        label:
          text: Casa
          x: 5500
          "y": 5700
          offset_y: 30
        outline:
          - - -950
            - -300
          - - 12100
            - -300
          - - 12100
            - 10050
          - - -950
            - 10050

So, I select with 1 click the all house ad then start clicking only one button. If this is possible, I have solved my problem.
I can do the first option with card mode :stuck_out_tongue:
thank you so much

Here is a config for you:

map_modes:
  ...
  - template: vacuum_clean_segment
    name: Pulizia Casa
    icon: mdi:check-all
    service_call_schema:
      service: vacuum.start
      service_data:
        entity_id: "[[entity_id]]"
    predefined_selections:
      - id: 0 # it doesn't really matter, as it is not used in the actual service call anymore
        icon:
          name: mdi:home
          x: 5500
          "y": 5700
        label:
          text: Casa
          x: 5500
          "y": 5700
          offset_y: 30
        outline:
          - - -950
            - -300
          - - 12100
            - -300
          - - 12100
            - 10050
          - - -950
            - 10050

My previous posts asked about the possibility of using your option 2.
I click 1 time the map and then the “big blue” button

You haven’t mentioned you are ok with clicking on the map :stuck_out_tongue_winking_eye: I assumed you want it to start cleaning as soon as you select a map mode

:D:D:D Sorry for my bad english.
I tested your code and work very fine…finally :stuck_out_tongue: . I just replaced “[[entity_id]]” with “vacuum.l20_ultra_complete”
I basically made the wrong call
thank you so much for your precious support

Actually you don’t have to replace the entity id, the card would replace it by itself

I tried but it didn’t start, so I replaced it

Does anyone know if it is possible to set this value to a different by default?

No, you can’t. You can only set it to a constant value if you really want to

Why not? I always change it to x2.
How to do it?

Please post your config, I will adjust it for you.

Cześć. Uzywam twojej świetnej karty od kilku dni i wszystko super działa. Brakuje mi już tylko “kropki nad i”, a mianowicie chce dołożyć do trybów vacuum_follow_path, wybór sprzątania po ścieżce. Dodałem surową konfigurację follow_path do map_modes i utworzyłem scrypt który udostępniasz ale nie działa to umnie. Męczyłem by to dostosowac ale nie dam rady.
Mój odkurzacz to xiaomi vacuum robot X20+ w aplikacji Mi Home i integracja Dreame z Hacs bo nie działa Xiaomi Mio.
Usługi dream_vacuum.vacuum_clean_spot i dreame_vacuum.vacuum_goto działają w narzędziach deweloperskich.
Czy mógbyś mi pomóc dopracować twój scrypt?
Moja skrócona konfiguracja:

type: custom:xiaomi-vacuum-map-card
                preset_name: Parter
                map_source:
                  camera: camera.xiaomi_robot_vacuum_x20_map
                  crop:
                    top: 8
                    bottom: -30
                calibration_source:
                  camera: true
                entity: vacuum.xiaomi_robot_vacuum_x20
                vacuum_platform: Tasshack/dreame-vacuum
                map_locked: true
                two_finger_pan: false
                language: pl
                append_icons: false
                tiles: []
                activate_on_switch: true
                activate:
                  service: select.select_option
                  service_data:
                    entity_id: select.xiaomi_robot_vacuum_x20_selected_map
                    option: Parter
                card_mod:
                  style: |
                    ha-card {
                      --map-card-zoomer-background: rgba(28, 28, 28, 0.7);
                      --map-card-room-label-font-size: 12px;
                      --map-card-room-label-color: white;
                      --map-card-room-icon-wrapper-size: 35px;
                      --map-card-predefined-rectangle-label-color: white;
                      --map-card-predefined-rectangle-icon-wrapper-size: 35px;
                      --map-card-room-outline-line-color: silver;
                      --map-card-room-outline-line-width: 0.5px;
                      --map-card-room-outline-line-segment-gap: 6px;
                      --map-card-big-radius: 10px;
                      --map-card-small-radius: 6px;
                    }
                    svg text {
                      font-weight: normal;
                      font-color: white;
                    }  
                icons:
                  - icon: mdi:play
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: cleaning
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: error
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: returning
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: docked
                    tooltip: Start
                    tap_action:
                      action: call-service
                      service: vacuum.start
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                  - icon: mdi:pause
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: docked
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: idle
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: error
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: paused
                    tooltip: Pause
                    tap_action:
                      action: call-service
                      service: vacuum.pause
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                  - icon: mdi:stop
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: docked
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: idle
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: error
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: paused
                    tooltip: Stop
                    tap_action:
                      action: call-service
                      service: vacuum.stop
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                  - icon: mdi:home-map-marker
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: docked
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: returning
                    tooltip: Return to base
                    tap_action:
                      action: call-service
                      service: vacuum.return_to_base
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                  - icon: mdi:map-marker
                    tooltip: Locate
                    tap_action:
                      action: call-service
                      service: vacuum.locate
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                  - menu_id: fan_speed
                    icon: mdi:fan-remove
                    label: Silent
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value: Silent
                    tooltip: Change fan speed
                    tap_action:
                      action: call-service
                      service: vacuum.set_fan_speed
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                        fan_speed: Silent
                  - menu_id: fan_speed
                    icon: mdi:fan-speed-1
                    label: Standard
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value: Standard
                    tooltip: Change fan speed
                    tap_action:
                      action: call-service
                      service: vacuum.set_fan_speed
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                        fan_speed: Standard
                  - menu_id: fan_speed
                    icon: mdi:fan-speed-2
                    label: Strong
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value: Strong
                    tooltip: Change fan speed
                    tap_action:
                      action: call-service
                      service: vacuum.set_fan_speed
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                        fan_speed: Strong
                  - menu_id: fan_speed
                    icon: mdi:fan-speed-3
                    label: Turbo
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value: Turbo
                    tooltip: Change fan speed
                    tap_action:
                      action: call-service
                      service: vacuum.set_fan_speed
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                        fan_speed: Turbo
                  - icon: mdi:fan-alert
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value_not: Silent
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value_not: Standard
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value_not: Strong
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: fan_speed
                        value_not: Turbo
                    tooltip: Change fan speed
                    tap_action:
                      action: call-service
                      service: vacuum.set_fan_speed
                      service_data:
                        entity_id: vacuum.xiaomi_robot_vacuum_x20
                        fan_speed: Silent
                  - menu_id: mop_water
                    icon: mdi:water
                    label: Lekko suchy
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: mop_pad_humidity
                        value: Slightly dry
                    tooltip: Zmień wilgotność mopa
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: slightly_dry
                        entity_id: select.xiaomi_robot_vacuum_x20_mop_pad_humidity
                  - menu_id: mop_water
                    icon: mdi:water
                    label: Wilgotny
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: mop_pad_humidity
                        value: Moist
                    tooltip: Zmień wilgotność mopa
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: moist
                        entity_id: select.xiaomi_robot_vacuum_x20_mop_pad_humidity
                  - menu_id: mop_water
                    icon: mdi:water
                    label: Mokry
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: mop_pad_humidity
                        value: Wet
                    tooltip: Zmień wilgotność mopa
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: wet
                        entity_id: select.xiaomi_robot_vacuum_x20_mop_pad_humidity
                  - menu_id: cleaning_mode
                    icon: mdi:broom
                    label: Odkurzanie
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: cleaning_mode
                        value: Sweeping
                    tooltip: Tryb sprzątania
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: sweeping
                        entity_id: select.xiaomi_robot_vacuum_x20_cleaning_mode
                  - menu_id: cleaning_mode
                    icon: mdi:broom
                    label: Odkurzanie i mycie
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: cleaning_mode
                        value: Sweeping and mopping
                    tooltip: Tryb sprzątania
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: sweeping_and_mopping
                        entity_id: select.xiaomi_robot_vacuum_x20_cleaning_mode
                  - menu_id: cleaning_mode
                    icon: mdi:broom
                    label: Mopowanie
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: cleaning_mode
                        value: Mopping
                    tooltip: Tryb sprzątania
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: mopping
                        entity_id: select.xiaomi_robot_vacuum_x20_cleaning_mode
                  - menu_id: cleaning_mode
                    icon: mdi:broom
                    label: Mopowanie po sprzątaniu
                    conditions:
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        attribute: cleaning_mode
                        value: Mopping after sweeping
                    tooltip: Tryb sprzątania
                    tap_action:
                      action: call-service
                      service: select.select_option
                      service_data:
                        option: mopping_after_sweeping
                        entity_id: select.xiaomi_robot_vacuum_x20_cleaning_mode
                  - menu_id: customize
                    icon: mdi:home-search
                    label: Niestandardowe on/off
                    conditions:
                      - entity: sensor.xiaomi_robot_vacuum_x20_task_status
                        value: completed
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: idle
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: returning
                    tooltip: Rodzaj sprzątania
                    tap_action:
                      action: call-service
                      service: switch.toggle
                      service_data:
                        entity_id: switch.xiaomi_robot_vacuum_x20_customized_cleaning
                  - menu_id: order
                    icon: mdi:order-numeric-ascending
                    label: Kolejność on/off
                    conditions:
                      - entity: sensor.xiaomi_robot_vacuum_x20_task_status
                        value: completed
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: idle
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: returning
                    tooltip: Kolejność sprzątania
                    tap_action:
                      action: call-service
                      service: input_boolean.toggle
                      service_data:
                        entity_id: input_boolean.xiaomi_vacuum_kolejnosc_sprzatania
                  - menu_id: settings
                    icon: mdi:wrench-cog
                    label: Serwis on/off
                    conditions:
                      - entity: sensor.xiaomi_robot_vacuum_x20_task_status
                        value: completed
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: idle
                      - entity: vacuum.xiaomi_robot_vacuum_x20
                        value_not: returning
                    tooltip: Serwis stancji
                    tap_action:
                      action: call-service
                      service: input_boolean.toggle
                      service_data:
                        entity_id: input_boolean.xiaomi_vacuum_serwis_stacji
                map_modes:
                  - template: vacuum_clean_zone
                  - template: vacuum_clean_point
                  - name: Sprzątanie po ścieżce
                    icon: mdi:map-marker-path
                    selection_type: MANUAL_PATH
                    max_selections: 5
                    repeats_type: NONE
                    max_repeats: 5
                    service_call_schema:
                      service: script.vacuum_follow_path
                      service_data:
                        path: '[[selection]]'
                        repeats: '[[repeats]]'
                        predefined: 'false'
                      target:
                        entity_id: '[[entity_id]]'
                  - template: vacuum_clean_zone_predefined
                    name: Strefy lista
                    predefined_selections:
                      - zones:
                          - - 217
                            - 322
                            - 1638
                            - 2157
                        label:
                          text: Dywan
                          x: 878
                          'y': 1522
                          offset_y: 35
                        icon:
                          name: mdi:rug
                          x: 878
                          'y': 1422
                      - zones:
                          - - 3240
                            - -5710
                            - 4327
                            - -4096
                        label:
                          text: Wycieraczka
                          x: 3730
                          'y': -4534
                          offset_y: 35
                        icon:
                          name: mdi:rug
                          x: 3730
                          'y': -4834
                  - name: Idź do punktu
                    icon: mdi:map-marker-radius
                    selection_type: MANUAL_POINT
                    max_selections: 5
                    repeats_type: NONE
                    max_repeats: 5
                    service_call_schema:
                      service: script.xiaomi_vacuum_goto
                      service_data:
                        x: '[[point_x]]'
                        'y': '[[point_y]]'
                        predefined: 'false'
                      target:
                        entity_id: '[[entity_id]]'
                  - template: vacuum_clean_segment
                    predefined_selections:
                      - id: '1'
                        icon:
                          name: mdi:desktop-classic
                          x: 7350
                          'y': 200
                        label:
                          text: Biuro
                          x: 7350
                          'y': 200
                          offset_y: 35
                        outline:
                          - - 5300
                            - -1600
                          - - 8900
                            - -1600
                          - - 8900
                            - 1950
                          - - 5300
                            - 1950