Help with zone cleaning parameters - Xiaomi vacuum

take a look on the map , if u start cleaning manual , it recreate map and somtimes it rotates and coordinates now wrong. to clean all zones u can use scripting like

alias: "Vacuum kitchen"
sequence:
# Go to starting point in the kids room
  - service: vacuum.send_command
data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
  command: app_goto_target
  params: [26000,24750]
  #Wait untill done
 - wait_template: "{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status == 'Idle'}}"
 - service: input_number.set_value
data:
  entity_id: input_number.vaccum_progress
  value: 1
- delay: '00:00:30'
#clean room
- service: vacuum.send_command
data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
  command: app_zoned_clean
  params: [[26496,23720,28796,26120,3]]
  #Wait untill done
  - wait_template: "{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status == 'Returning home'}}"
  - service: input_number.set_value
data:
    entity_id: input_number.vaccum_progress
    value: 2
- delay: '00:00:05'
#Stop going home
- service: vacuum.stop
  data:
    entity_id: vacuum.xiaomi_vacuum_cleaner
- service: vacuum.send_command
  data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
    command: app_zoned_clean
    params: [[20724,16754,25624,20740,3]]
1 Like

It seems that there is no reliable way to work with zones now…

I had set all commands to interface with the vacuum with zone cleaning to avoid erasing the map by starting a full cleanup.

Everything was working great. I just picked up the vacuum from the charging station to clean the main brushes and put it back again were it was. Started a zoned cleanup just like before and the map was mirrored, inverted everything.

I did not moved the charger dock, just picked up and put it back exactly where it was.

I am about to give up on zone cleaning using HA… Really sad but found it too unreliable for now. :cry:

Weird, never happend to me… however since my Robot is under the couch i cannot pick it up from the charging station. So instead i let it drive out, clean it, and then let it drive back.
It has been stable for me for weeks. Maybe give this a try.

For me even a return to station via hardware buttons will erase the map. How do you put the vacuum back to the station?I didn’t check if resuming cleaning will also delete the map . I can let it come out while it cleans a zone …take it …clean it and push resume button on it.

But to get rid of that I just make a full clean and map is back…after this I can use zones cleaning … anyway zoned cleaning is meant for you exceptions not daily usage

Weird, i use the return to station button and resume cleaning button all the time. Maybe you need a firmware update on the Bot?

No update available…how exactly did I setup this cloned cleaning.my map apparently turned when I made return … Zone was totally wrong

Hello @AlmostSerious!

The multiple zones trick did not work here, got this error:

Error loading /config/configuration.yaml: while parsing a block mapping
  in "/config/includes/packages/xiaomi_vacuum.yaml", line 360, column 9
expected <block end>, but found ','
  in "/config/includes/packages/xiaomi_vacuum.yaml", line 362, column 46

This is my script:

  aspirador_zona_mop:
    sequence:
    - service: input_select.select_option
      entity_id: input_select.estados_de_succao
      data:
        option: Pano úmido
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[17721,25369,27121,32169,1]],[[18080,20509,22930,25659,1]],[[25122,22132,26122,25682,1]]
    - service: script.aspirador_alerta_iniciando

Did it work for you?

Thanks!

You have too many brackets in the Zone. Its this format: [[Zone1],[Zone2],[Zone3]]

1 Like

Will give it a shot! Thanks!

Did it work with less brackets
?

Yep, all is good. This works like a charm:

  aspirador_zona_suite:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18931,21286,22581,23936,1],[21250,23964,22100,25464,1]]
    - service: script.aspirador_alerta_iniciando

Is the map still present after zoned cleaning or do u have to proceed a full clean after ?

Yes, if nothing bad happens the map is not changed and stored correctly.

Sometimes the map gets distorted or rotated so I’ve created a script that starts a full cleanup, waits for a few seconds and send it back to dock. Doing so makes the vacuum recreate the map from scratch so I can use the zone cleanup again.

Not the ideal way but a good workaround for me. Still waiting for Xiaomi to release the new firmware that stores and uses the map it created in memory, for reference, they are currently working on it.

To be continued… Looking forward to it

@Schneider hello!
I have the same problem : The vacuum starts, gets out of the dock, turn around and says that the cleaning is done, then return do home.

I read carefully the post, and I am wondering :

The solution is to launch from scratch a full cleaning from HA interface of vacuum ?

I have no issue to collect correct coordinates (from Valetudo or Flolevac) but it is not working when I launch them from my automation.yalm (and those same coordinates would work if I launch them with valetudo for eg)

I read that this script was working for you:

aspirador_zona_suite:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18931,21286,22581,23936,1],[21250,23964,22100,25464,1]]
    - service: script.aspirador_alerta_iniciando

But there are 2 zones on your script, right ?

I hope someone will help me with this !

Thanks!

Hello sir! How are you?

Yes, this is a very common problem with this project. Maps gets rotated, mirrored out of the blue.

I’ve been problem-free for months now. My solution was to create a scripts that starts a full cleanup, waits a few seconds and send the vacuum home. This recreates a brand new map and stores it on the current map memory.

You will only see the current location mapped, so you will need to take him for a spin using the manual mode controls on the Xiaomi app so you can take it to every room and map all of it. After this procedure is done, return home and you will have a base map that will not change until if you don’t change the docking station location. If the map is messed up again, just return home and run the recreate map script again.

Now you can use the FloleVac app and get all zones coordinates with the new and correct map generated. Add them to your HA project and test it.

Don’t worry if the map gets messed up, just recreate the map and the coordinates will work just like before, since your docking station is on the same position (ZERO, ZERO coordinate) the vacuum will know were to go.

Here are my configs on a single package file:

sensor:

  - platform: template
    sensors:
      xiaomi_battery_level:
        entity_id: vacuum.aspirador
        friendly_name: 'Bateria do aspirador'
        value_template: '{{ states.vacuum.aspirador.attributes.battery_level | float | int }}'
        unit_of_measurement: '%'
        device_class: battery

switch:

  - platform: template
    switches:
      aspirador:
        friendly_name: "Aspirador"
        value_template: "{% if is_state('vacuum.aspirador', 'cleaning') %}on{% else %}off{% endif %}"
        turn_on:
          service: input_select.select_option
          entity_id: input_select.zonas_de_aspiracao
          data_template:
            option: "Casa toda"
        turn_off:
          service: vacuum.return_to_base
          data:
            entity_id: vacuum.aspirador
        icon_template: mdi:robot-vacuum

input_select:
  
  estados_de_succao:
    name: 'Tipo de aspiração'
    initial: Balanceado
    options:
      - Silencioso
      - Balanceado
      - Turbo
      - Turbo máximo
      - Pano úmido

  zonas_de_aspiracao:
    name: Qual a zona a aspirar?
    options:
      - Escolher zona
      - Casa toda
      - Sala inteira
      - Tapete
      - Mesa de jantar
      - Entrada
      - Cozinha
      - Banheiro social
      - Banheiro da suíte
      - Quarto
      - Suite
      - Suíte mais banheiro
      - Quartos e banheiros
      - Somente piso

automation:

#Coloca o aspirador em modo silencioso

  - alias: Aspirador - Modo de aspiração
    trigger:
      platform: state
      entity_id: input_select.estados_de_succao
    action:
      - service_template: >
          {% if trigger.to_state.state == 'Silencioso' %}
            script.aspirador_set_quiet
          {% elif trigger.to_state.state == 'Balanceado' %}
            script.aspirador_set_balanced
          {% elif trigger.to_state.state == 'Turbo' %}
            script.aspirador_set_turbo
          {% elif trigger.to_state.state == 'Turbo máximo' %}
            script.aspirador_set_max
          {% elif trigger.to_state.state == 'Pano úmido' %}
            script.aspirador_set_mop
          {% endif %}
  
#Escolher a zona a aspirar

  - alias: Aspirador - Escolher a zona para aspirar
    hide_entity: True
    trigger:
      platform: state
      entity_id: input_select.zonas_de_aspiracao
      from: 'Escolher zona'
    action:
      - service_template: >
          {% if states.input_select.zonas_de_aspiracao.state == "Casa toda" %}
            script.aspirador_zona_casa_toda
          {% elif states.input_select.zonas_de_aspiracao.state == "Sala inteira" %}
            script.aspirador_zona_sala_inteira
          {% elif states.input_select.zonas_de_aspiracao.state == "Tapete" %}
            script.aspirador_zona_tapete
          {% elif states.input_select.zonas_de_aspiracao.state == "Mesa de jantar" %}
            script.aspirador_zona_mesa_jantar
          {% elif states.input_select.zonas_de_aspiracao.state == "Entrada" %}
            script.aspirador_zona_entrada
          {% elif states.input_select.zonas_de_aspiracao.state == "Cozinha" %}
            script.aspirador_zona_cozinha
          {% elif states.input_select.zonas_de_aspiracao.state == "Banheiro social" %}
            script.aspirador_zona_banheiro_social
          {% elif states.input_select.zonas_de_aspiracao.state == "Banheiro da suíte" %}
            script.aspirador_zona_banheiro_suite
          {% elif states.input_select.zonas_de_aspiracao.state == "Quarto" %}
            script.aspirador_zona_quarto
          {% elif states.input_select.zonas_de_aspiracao.state == "Suite" %}
            script.aspirador_zona_suite
          {% elif states.input_select.zonas_de_aspiracao.state == "Suíte mais banheiro" %}
            script.aspirador_zona_suite_e_banheiro
          {% elif states.input_select.zonas_de_aspiracao.state == "Quartos e banheiros" %}
            script.aspirador_zona_quartos_e_banheiros
          {% elif states.input_select.zonas_de_aspiracao.state == "Somente piso" %}
            script.aspirador_zona_mop
          {% else %}
          {% endif %}
      - delay: 00:01:00
      - wait_template: "{{is_state('vacuum.aspirador', 'docked')}}"
      - delay: 00:00:15
      - service: input_select.select_option
        entity_id: input_select.zonas_de_aspiracao
        data_template:
          option: "Escolher zona"
      - service: input_select.select_option
        entity_id: input_select.estados_de_succao
        data_template:
          option: "Turbo"

  - alias: Aspirador - Avisar quando terminar
    initial_state: True
    trigger:
      - platform: state
        entity_id: vacuum.aspirador
        to: 'paused'
        for:
          hours: 0
          minutes: 0
          seconds: 30
      - platform: state
        entity_id: vacuum.aspirador
        to: 'docked'
      - platform: state
        entity_id: vacuum.aspirador
        to: 'error'
    action:
      - service_template: >
          {% if trigger.to_state.state == 'paused' %}
            script.aspirador_alerta_parado
          {% elif trigger.to_state.state == 'docked' %}
            script.aspirador_alerta_carregando
          {% elif trigger.to_state.state == 'error' %}
            script.aspirador_alerta_erro
          {% endif %}

script:

  aspirador_set_quiet:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: Quiet

  aspirador_set_balanced:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: Balanced

  aspirador_set_turbo:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: Turbo
 
  aspirador_set_max:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: Max

  aspirador_set_mop:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: 105

# Zonas

  aspirador_zona_casa_toda:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[17327,20045,27427,32995,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_sala_inteira:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[23745,21949,25745,31299,1],[22491,25343,23741,27643,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_tapete:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[23804,23551,25004,25301,2]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_mesa_jantar:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[23573,26400,25823,28850,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_entrada:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[23620,28957,24920,31307,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_cozinha:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18839,29577,23689,31177,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_banheiro_social:
    sequence:
    - service: input_select.select_option
      entity_id: input_select.estados_de_succao
      data:
        option: Turbo
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18885,25636,21185,26786,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_banheiro_suite:
    sequence:
    - service: input_select.select_option
      entity_id: input_select.estados_de_succao
      data:
        option: Turbo
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18815,24240,21115,25390,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_quarto:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18484,27011,21984,29461,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_suite:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18931,21286,22581,23936,1],[21250,23964,22100,25464,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_suite_e_banheiro:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18897,21234,22497,25434,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_quartos_e_banheiros:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18554,21238,22454,29338,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_zona_mop:
    sequence:
    - service: input_select.select_option
      entity_id: input_select.estados_de_succao
      data:
        option: Pano úmido
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[18554,21238,22454,29338,1],[22528,25448,25878,27598,1],[25164,22181,25814,25431,1],[18854,29557,24854,31407,1],[23607,27587,25857,29537,1]]
    - service: script.aspirador_alerta_iniciando

  aspirador_voltar_dock:
    alias: Aspirador casa - Parar e voltar
    sequence:
    - service: vacuum.return_to_dock
      entity_id: vacuum.aspirador

# Alertas

  aspirador_alerta_iniciando:
    alias: Aspirador casa - Iniciando
    sequence:
    - service: notify.TUDO
      data_template:
        title: "Alerta Casa"
        message: "O aspirador iniciou a limpeza na zona: {{ states.input_select.zonas_de_aspiracao.state | lower }}."
    - service: persistent_notification.create
      data:
        title: "Alerta Casa ({{now().strftime('%H:%M')}})"
        message: "O aspirador iniciou a limpeza na zona: {{ states.input_select.zonas_de_aspiracao.state | lower }}"
    - condition: state
      entity_id: input_boolean.boa_noite
      state: 'off'
    - service: media_player.volume_set
      entity_id: media_player.sala, media_player.suite
      data:
        volume_level: 0.7
    - service: tts.amazon_polly_say
      entity_id: media_player.sala, media_player.suite
      data_template:
        message: <speak><amazon:auto-breaths frequency='medium'>E lá vai ele... Iniciando a limpeza na zona {{ states.input_select.zonas_de_aspiracao.state | lower }}.</amazon:auto-breaths></speak>

  aspirador_alerta_parado:
    alias: Aspirador casa - Parado
    sequence:
    - service: notify.TUDO
      data_template:
        title: "Alerta Casa"
        message: "O aspirador parou. Estava limpando a zona: {{ states.input_select.zonas_de_aspiracao.state | lower }}. {% if 'error' in states.vacuum.aspirador.state %}Código de erro: {{ states.vacuum.aspirador.attributes.error }}.{% else %}{% endif %}"
    - service: persistent_notification.create
      data:
        title: "Alerta Casa ({{now().strftime('%H:%M')}})"
        message: "O aspirador parou. Estava limpando a zona: {{ states.input_select.zonas_de_aspiracao.state | lower }}. {% if 'error' in states.vacuum.aspirador.state %}Código de erro: {{ states.vacuum.aspirador.attributes.error }}.{% else %}{% endif %}"
    - condition: state
      entity_id: input_boolean.boa_noite
      state: 'off'
    - service: media_player.volume_set
      entity_id: media_player.sala, media_player.suite
      data:
        volume_level: 0.7
    - service: tts.amazon_polly_say
      entity_id: media_player.sala, media_player.suite
      data_template:
        message: <speak><amazon:auto-breaths frequency='medium'>O aspirador parou limpando a zona {{ states.input_select.zonas_de_aspiracao.state | lower }}. {% if 'error' in states.vacuum.aspirador.state %}Código de erro é {{ states.vacuum.aspirador.attributes.error }}.{% else %}{% endif %}</amazon:auto-breaths></speak>

  aspirador_alerta_carregando:
    alias: Aspirador casa - Voltou para casa
    sequence:
    - condition: template
      value_template: "{% if is_state('input_select.zonas_de_aspiracao', 'Escolher zona') %}False{% else %}True{% endif %}"
    - service: notify.TUDO
      data_template:
        title: "Alerta Casa"
        message: "O aspirador terminou seu trabalho na zona {{ states.input_select.zonas_de_aspiracao.state | lower }}. Limpou cerca de {{ states.vacuum.aspirador.attributes.cleaned_area }} metros quadrados durante {{ states.vacuum.aspirador.attributes.cleaning_time }} minutos e está carregando no momento."
    - service: persistent_notification.create
      data:
        title: "Alerta Casa ({{now().strftime('%H:%M')}})"
        message: "O aspirador terminou seu trabalho na zona {{ states.input_select.zonas_de_aspiracao.state | lower }}. Limpou cerca de {{ states.vacuum.aspirador.attributes.cleaned_area }} metros quadrados durante {{ states.vacuum.aspirador.attributes.cleaning_time }} minutos e está carregando no momento."
    - condition: state
      entity_id: input_boolean.boa_noite
      state: 'off'
    - service: media_player.volume_set
      entity_id: media_player.sala, media_player.suite
      data:
        volume_level: 0.7
    - service: tts.amazon_polly_say
      entity_id: media_player.sala, media_player.suite
      data_template:
        message: <speak><amazon:auto-breaths frequency='medium'>Olha quem está de volta! O aspirador terminou seu trabalho na zona {{ states.input_select.zonas_de_aspiracao.state | lower }}. Limpou cerca de {{ states.vacuum.aspirador.attributes.cleaned_area }} metros quadrados durante {{ states.vacuum.aspirador.attributes.cleaning_time }} minutos e está carregando no momento.</amazon:auto-breaths></speak>

  aspirador_alerta_erro:
    alias: Aspirador casa - Erro
    sequence:
    - service: notify.TUDO
      data_template:
        title: "Alerta Casa"
        message: "O aspirador está parado e acusou erro limpando a zona {{ states.input_select.zonas_de_aspiracao.state | lower }}."
    - service: persistent_notification.create
      data:
        title: "Alerta Casa ({{now().strftime('%H:%M')}})"
        message: "O aspirador está parado e acusou erro limpando a zona {{ states.input_select.zonas_de_aspiracao.state | lower }}."
    - condition: state
      entity_id: input_boolean.boa_noite
      state: 'off'
    - service: media_player.volume_set
      entity_id: media_player.sala, media_player.suite
      data:
        volume_level: 0.7
    - service: media_player.play_media
      data:
        entity_id: media_player.sala, media_player.suite
        media_content_id: 'https://DDNS/local/audio/tts/alerta_aspirador_parado_erro.mp3'
        media_content_type: 'audio/mp3'

# HomeKit scripts

  aspirador_homekit_zona_toda_casa:
    alias: Aspirador casa - Aspirar zona casa toda
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Casa toda"
    - delay: 00:00:10

  aspirador_homekit_zona_sala:
    alias: Aspirador casa - Aspirar zona sala inteira
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Sala inteira"
    - delay: 00:00:10

  aspirador_homekit_zona_mesa_jantar:
    alias: Aspirador casa - Aspirar zona mesa de jantar
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Mesa de jantar"
    - delay: 00:00:10

  aspirador_homekit_zona_tapete:
    alias: Aspirador casa - Aspirar zona tapete
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Tapete"
    - delay: 00:00:10

  aspirador_homekit_zona_entrada:
    alias: Aspirador casa - Aspirar zona entrada
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Entrada"
    - delay: 00:00:10

  aspirador_homekit_zona_cozinha:
    alias: Aspirador casa - Aspirar zona cozinha
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Cozinha"
    - delay: 00:00:10

  aspirador_homekit_zona_quartos:
    alias: Aspirador casa - Aspirar zona quartos e banheiros
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Quartos e banheiros"
    - delay: 00:00:10

  aspirador_homekit_zona_mop:
    alias: Aspirador casa - Aspirar zona somente piso
    sequence:
    - service: input_select.select_option
      entity_id: input_select.zonas_de_aspiracao
      data_template:
        option: "Somente piso"
    - delay: 00:00:10

# Outros

  aspirador_recriar_mapa:
    alias: Aspirador casa - Recriar mapa
    sequence:
    - service: vacuum.start
      entity_id: vacuum.aspirador
    - delay: 00:00:08
    - service: vacuum.stop
      entity_id: vacuum.aspirador
    - delay: 00:00:02
    - service: vacuum.return_to_base
      entity_id: vacuum.aspirador

# Customize

homeassistant:
  customize:

    switch.aspirador:
      icon: mdi:robot-vacuum

    input_select.estados_de_succao:
      icon: mdi:speedometer

    input_select.zonas_de_aspiracao:
      icon: mdi:map-marker

    input_number.aspirador_passadas:
      icon: mdi:shuffle-disabled

    script.aspirador_recriar_mapa:
      icon: mdi:home-map-marker

This is my current UI:

Here is the lovelace config:

- type: entities
  title: Aspirador
  show_header_toggle: false
  entities:
    - entity: vacuum.aspirador
      secondary_info: last-changed
    - sensor.xiaomi_battery_level
    - entity: script.aspirador_recriar_mapa
      name: Recriar mapa
    - input_select.estados_de_succao
    - input_select.zonas_de_aspiracao
    - type: custom:entity-attributes-card
      entity: vacuum.aspirador
      heading_name: Status
      heading_state: Valor
      filter:
        include:
          - key: vacuum.aspirador.cleaning_time
            name: Tempo limpando (último)
            unit: minutos
          - key: vacuum.aspirador.cleaned_area
            name: Área limpa (último)
            unit: metros
          - key: vacuum.aspirador.main_brush_left
            name: Escova principal
            unit: horas
          - key: vacuum.aspirador.side_brush_left
            name: Escova lateral
            unit: horas
          - key: vacuum.aspirador.filter_left
            name: Filtro
            unit: horas
          - key: vacuum.aspirador.sensor_dirty_left
            name: Sensores
            unit: horas

It has been months now without any problems with zone cleaning. If I need to clean it up by removing the vacuum manually from the dock, I just need to recreate the map using the script and all works just fine.

And yes, some of these scripts has more than one zone on the same command, works just fine.

Sorry that everything is in portuguese, I hope you can understand the main idea here.

Hope it helps!

6 Likes

Try with this:
'{{ ("[[30914,26007,35514,28807" + "," + (states("input_number.vacuum_passes") | int | string + "]]") )}}'

  vacuum_cucina:
    sequence:
    - service: vacuum.send_command
      data:
        entity_id: vacuum.xiaomi_vacuum
        command: app_zoned_clean
        params: '{{ ("[[30914,26007,35514,28807" + "," + (states("input_number.vacuum_passes") | int | string + "]]") )}}'
    - service: script.vacuum_alert_start
2 Likes

Hi @Schneider,
thanks again for your great post, it helped me a lot.
I was trying to test your notify part (notify tudo). It wasn’t on your code posted.
Could you kindly share with me ?

Many thanks !

And ,do you know if it’s possible to activate the carpet mode? Or it’s activated by default ?

Hello sir! I am glad I could help you!

No worries. This notify part is a “notify group” that I’ve created to send a message to a few devices (all mobile phones, Google Home Minis, TVs, and so on), you can set they way you want to be notified with your setup.

The carpet mode is activated automatically but I suggest you set the vacuum power to max anyways if you had created a zone that contains only your carpet.

Another great tip is that fan_speed 105 sets the vacuum in to MOP mode, you can check on your mobile app that the mopping mode is selected.

Let me know if you need anything else.

Good luck!

1 Like

Hi Schneider! Good news I found a valetudo branch with clickable zoned cleaning .I compiled this piece of software and will test and report … then it should be possible to select zoned cleaning within a map . But u need complete map before which includes full clean and don’t carry your robot around :wink: I’ll report tomorrow if it works well

2 Likes