PiotrMachowski / lovelace-xiaomi-vacuum-map-card

This card provides a user-friendly way to fully control map-based vacuums in Home Assistant. Supported brands include Xiaomi (Roborock/Viomi/Dreame/Roidmi/Valetudo/Valetudo RE), Neato, Wyze, Roomba, Ecovacs (and probably more).
MIT License
1.45k stars 249 forks source link

Predefined zone starts sends vacuum.start instead of vacuum.vacuum_clean_zone service call #461

Closed szymon3 closed 2 years ago

szymon3 commented 2 years ago

Checklist

The problem

For some reason since last few days when I try to start my cleaning with card, it sends vacuum.start service call which start full house cleaning, instead of vacuum.vacuum_clean_zone. I have few scripts defined with vacuum.vacuum_clean_zone and hardcoded coordinates (added to Additional information section) and when I start cleaning using that scripts, everything goes well. I opened HA Developer Tools and started listening on call_service events. After starting cleaning of predefied zone, vacuum.start appeared - see screenshot: Service call

What version of a card has described problem?

v2.0.11

What was the last working version card?

No response

What vacuum model do you have problems with?

viomi.vacuum.v8

Which integration do you use to control your vacuum (link)?

https://github.com/KrzysztofHajdamowicz/home-assistant-vacuum-styj02ym

What browser (browsers/apps) does have this problem?

Tested on Chrome and Firefox

What version of Home Assistant do you use?

core-2022.8.3

What type of installation are you running?

Home Assistant Container

Card's configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
entity: vacuum.vacuum
vacuum_platform: KrzysztofHajdamowicz/miio2
title: ''
two_finger_pan: false
map_locked: true
map_modes:
  - template: vacuum_clean_zone_predefined
    predefined_selections:
      - zones:
          - - -4.616977225672878
            - -3.4247412008281577
            - -0.27743271221532106
            - 0.3102484472049687
        label:
          text: Sypialnia
          x: -2.65
          'y': -1.5
          offset_y: 25
        icon:
          name: mdi:broom
          x: -2.65
          'y': -1.5
      - zones:
          - - -3.424430641821947
            - 0.5421325051759833
            - -1.8592132505175982
            - 2.9355072463768117
        label:
          text: Łazienka
          x: -2.65
          'y': 1.9
          offset_y: 25
        icon:
          name: mdi:broom
          x: -2.65
          'y': 1.9
      - zones:
          - - -1.8509316770186333
            - 0.2771221532091106
            - 1.1552795031055911
            - 2.5711180124223603
        label:
          text: Przedpokój
          x: -0.8
          'y': 1.7
          offset_y: 25
        icon:
          name: mdi:broom
          x: -0.8
          'y': 1.7
      - zones:
          - - -0.16149068322981375
            - -3.391614906832298
            - 4.3271221532091095
            - 1.5027950310559008
        label:
          text: Salon
          x: 3.5
          'y': -1
          offset_y: 25
        icon:
          name: mdi:broom
          x: 3.5
          'y': -1
      - zones:
          - - 4.293995859213252
            - -3.3998964803312637
            - 5.171842650103521
            - 1.2295031055900614
        label:
          text: Kuchnia
          x: 4.7
          'y': -1
          offset_y: 25
        icon:
          name: mdi:broom
          x: 4.7
          'y': -1
      - zones:
          - - 1.131815044858521
            - -3.036887508626637
            - 2.7329192546583814
            - -0.2763630089717033
        label:
          text: Sofa
          x: 1.87
          'y': -2.1
          offset_y: 25
        icon:
          name: mdi:broom
          x: 1.87
          'y': -2.1
      - zones:
          - - 0.9551414768806064
            - 0.2646997929606645
            - 2.699792960662524
            - 1.5014147688060753
        label:
          text: Biurko
          x: 1.83
          'y': 1.3
          offset_y: 25
        icon:
          name: mdi:broom
          x: 1.83
          'y': 1.3
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 14
        label:
          text: Sypialnia
          x: -2.4749999999999996
          'y': -1.5250000000000001
          offset_y: 35
        icon:
          name: mdi:broom
          x: -2.4749999999999996
          'y': -1.5250000000000001
      - id: 12
        label:
          text: Salon
          x: 2.05
          'y': -0.8999999999999999
          offset_y: 35
        icon:
          name: mdi:broom
          x: 2.05
          'y': -0.8999999999999999
      - id: 11
        label:
          text: Kuchnia
          x: 4.699999999999999
          'y': -1.0999999999999999
          offset_y: 35
        icon:
          name: mdi:broom
          x: 4.699999999999999
          'y': -1.0999999999999999
      - id: 13
        label:
          text: Przedpokój
          x: -0.375
          'y': 1.45
          offset_y: 35
        icon:
          name: mdi:broom
          x: -0.375
          'y': 1.45
      - id: 10
        label:
          text: Łazienka
          x: -2.55
          'y': 1.7999999999999998
          offset_y: 35
        icon:
          name: mdi:broom
          x: -2.55
          'y': 1.7999999999999998
  - template: vacuum_clean_zone
  - template: vacuum_goto

Javascript errors shown in the browser's console (if applicable)

No response

Additional information

Example script which is starting correct cleaning (Sofa zone):

zone:
  - - 1.131815044858521
    - -3.036887508626637
    - 2.7329192546583814
    - -0.2763630089717033
repeats: 1
entity_id: vacuum.vacuum
PiotrMachowski commented 2 years ago

Have you used correct "play" button? image

szymon3 commented 2 years ago

I'm stupid, thank you. 🤦‍♂️