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.37k stars 244 forks source link

HA2024.7+: Clicking "Generate Rooms Config" doesn't do anything, and Selection is always empty #747

Open b-per opened 5 days ago

b-per commented 5 days ago

Checklist

The problem

I am trying to set up my Dreame D10 Plus, but I have having issues getting the list of rooms from my camera.

image

My camere is showing the map as expected but when I click "Generate Rooms Config" nothing happens. Similarly, when I add points to the map, the Selection value stays empty at [].

I have also tried to save the card, close it and clicking again on the button but nothing happens.

If I follow the instructions for < 2.1.0 with the template though, it generates some configuration I can use.

What version of a card has described problem?

v2.2.2

What was the last working version card?

No response

What vacuum model do you have problems with?

dreame.vacuum.r2205

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

https://github.com/Tasshack/dreame-vacuum

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

Chrome/Safari

What version of Home Assistant do you use?

2024.7.0

What type of installation are you running?

Home Assistant Container

Card's configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.booty_map
calibration_source:
  camera: true
entity: vacuum.booty
vacuum_platform: Tasshack/dreame-vacuum

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

None

Additional information

No response

b-per commented 5 days ago

Here is my camera state as well

access_token: abcd
charger_position:
  x: 531
  "y": -52
  a: 180
rooms:
  "1":
    x0: 650
    y0: -10450
    x1: 1750
    y1: -1650
    room_id: 1
    name: Corridor
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 8
    index: 0
    icon: mdi:foot-print
    color_index: 0
    x: 1250
    "y": -5800
    letter: A
  "2":
    x0: 850
    y0: 1450
    x1: 4350
    y1: 3050
    room_id: 2
    name: Entrance
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 0
    index: 0
    icon: mdi:home-outline
    color_index: 1
    x: 2600
    "y": 2400
    letter: B
  "3":
    x0: 1600
    y0: -3900
    x1: 3650
    y1: 1600
    room_id: 3
    name: Kitchen
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 4
    index: 0
    icon: mdi:chef-hat
    color_index: 2
    x: 2650
    "y": -1150
    letter: C
  "4":
    x0: -3050
    y0: -5100
    x1: 700
    y1: -2700
    room_id: 4
    name: OfficeBen
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 0
    index: 1
    icon: mdi:home-outline
    color_index: 1
    x: -1500
    "y": -3850
    letter: D
  "6":
    x0: 1750
    y0: -6150
    x1: 3650
    y1: -4600
    room_id: 6
    name: Bathroom2
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 0
    index: 3
    icon: mdi:home-outline
    color_index: 2
    x: 2450
    "y": -5350
    letter: F
  "7":
    x0: -3050
    y0: -7600
    x1: 800
    y1: -5300
    room_id: 7
    name: OfficePat
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 0
    index: 2
    icon: mdi:home-outline
    color_index: 3
    x: -1500
    "y": -6400
    letter: G
  "8":
    x0: 1700
    y0: -10550
    x1: 3650
    y1: -7750
    room_id: 8
    name: Bathroom
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 6
    index: 0
    icon: mdi:toilet
    color_index: 1
    x: 2400
    "y": -9100
    letter: H
  "9":
    x0: -3800
    y0: -2550
    x1: 850
    y1: 3050
    room_id: 9
    name: Living Room
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 1
    index: 0
    icon: mdi:sofa-outline
    color_index: 3
    x: -1500
    "y": 500
    letter: I
  "12":
    x0: -3850
    y0: -10550
    x1: 700
    y1: -7800
    room_id: 12
    name: Primary Bedroom
    order: 0
    cleaning_times: 1
    suction_level: 1
    water_volume: 2
    type: 2
    index: 0
    icon: mdi:bed-king-outline
    color_index: 2
    x: -3050
    "y": -9300
    letter: L
vacuum_position:
  x: 531
  "y": -52
  a: 0
map_id: 3
rotation: 0
updated_at: "2024-07-04T22:43:10.236833"
used_times: 1
active_segments:
  - 4
  - 12
no_go_areas:
  - x0: -4103
    y0: -10758
    x1: -3540
    y1: -10758
    x2: -3540
    y2: -10195
    x3: -4103
    y3: -10195
  - x0: -2262
    y0: -5164
    x1: -1154
    y1: -5164
    x2: -1154
    y2: -4582
    x3: -2262
    y3: -4582
  - x0: -3892
    y0: -294
    x1: -3329
    y1: -294
    x2: -3329
    y2: 261
    x3: -3892
    y3: 261
is_empty: false
frame_id: 448
calibration_points:
  - vacuum:
      x: 0
      "y": 0
    map:
      x: 384
      "y": 304
  - vacuum:
      x: 1000
      "y": 0
    map:
      x: 464
      "y": 304
  - vacuum:
      x: 0
      "y": 1000
    map:
      x: 384
      "y": 224
entity_picture: >-
  /api/camera_proxy/camera.booty_map?token=abcd
icon: mdi:map
friendly_name: Booty Current Map
supported_features: 0
PiotrMachowski commented 4 days ago

Have you tried it on any previous version of the HA? Is the map card inside any other card?

yeyeoke commented 4 days ago

I'm actually having the exact same problem with a Roborock S5 running Hypfer/Valetudo. On Homeassistant 2024.7.0 Here's my card configuration:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.valetudo_s5
vacuum_platform: Hypfer/Valetudo
map_source:
  camera: camera.valetudo_s5_camera
calibration_source:
  camera: true
map_locked: true

My card is not inside any other card, and I have not tried it on an earlier version since I just found out about this awesome card.

b-per commented 4 days ago

I just installed 2024.6.4 and it worked as expected.

Seems to be a bug with related to 2024.7 then!

PiotrMachowski commented 4 days ago

It is not a bug in HA, it just seems that something has been changed in HA frontend and this change broke this functionality in the card. I will check it out and adjust the code to the latest HA

gatogatogato commented 18 hours ago

Same issue with a Dreame L20 Ultra and a D10s Pro. Any ETA when this will be fixed?

Btw thanks for this card, it's really amazing.

PiotrMachowski commented 18 hours ago

For Dreame integration you can use this config template to generate rooms config. Then adjust vacuum platform and it should be fine.

At this moment there is no ETA, I will analyze this issue this weekend.

gatogatogato commented 16 hours ago

That worked like a charm - thanks for the workaround.