Log Error: Failed to execute 'define' on 'CustomElementRegistry': the name "xiaomi-vacuum-map-card-editor" has already been used with this registry
ziptbm opened this issue · comments
Checklist
- I have updated the card to the latest version available
- I have cleared the cache of my browser
- I have checked if the problem is already reported
The problem
I'm seeing this error regularly in my logs coming from this card, but I'm not quite sure how to fix it. I've attempted already to uninstall and reinstall it (with reboots between), but it continues to persist regular. Any known workarounds or did I fail to do something right?
Logger: frontend.js.latest.202304111
Source: components/system_log/__init__.py:257
First occurred: 20:51:45 (1 occurrences)
Last logged: 20:51:45
http://10.0.0.161:8123/frontend_latest/app-BWfprBTJFp0.js:2:215408 Error: Failed to execute 'define' on 'CustomElementRegistry': the name "xiaomi-vacuum-map-card-editor" has already been used with this registry
What version of a card has described problem?
2.1.2
What was the last working version card?
No response
What vacuum model do you have problems with?
roborock.s4max
Which integration do you use to control your vacuum (link)?
https://www.home-assistant.io/integrations/xiaomi_miio/
What browser (browsers/apps) does have this problem?
All
What version of Home Assistant do you use?
2023.4.4
What type of installation are you running?
Home Assistant OS
Card's configuration
type: custom:xiaomi-vacuum-map-card
preset_name: Main Floor
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
entity: vacuum.buzz
vacuum_platform: default
two_finger_pan: true
append_icons: true
icons:
- icon: mdi:home-floor-1
tooltip: Main Floor
tap_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.buzz
command: load_multi_map
params: 0
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_zone_predefined
predefined_selections:
- zones:
- - 25500
- 25500
- 26500
- 26500
- template: vacuum_goto
additional_presets:
- preset_name: 2nd Floor
entity: vacuum.buzz
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
append_icons: true
icons:
- icon: mdi:home-floor-2
tooltip: 2nd Floor
tap_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.buzz
command: load_multi_map
params: 1
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_zone_predefined
predefined_selections:
- zones:
- - 27500
- 27500
- 28500
- 28500
- template: vacuum_goto
Javascript errors shown in the browser's console (if applicable)
No response
Additional information
No response
It looks like you have installed this card twice, is it possible? Or maybe added to resources twice
It looks like you have installed this card twice, is it possible? Or maybe added to resources twice
Wow, seems obvious....but I had to look up how to see the resources. I did see two listings for this. One had a hacstag and the other did not. I have no idea why that was there, so I took a guess and deleted the one without a hacstag. After doing this, I noticed the one card that I have this item in now looks like this:
So now, I went back to HACS and removed both the Xiaomi Vacuum Map Card and the Xiaomi Cloud Map Extractor, and then restarted Home Assistant. After restart, it started doing continual reboots from what I can tell because it didn't like the Extractor in my yaml. I finally got it to reboot and reinstall both, so now the card appears to be working. There now is only one listing in my resources, so I guess we'll see if that solves it.
Regarding missing map: PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#422
It seems like basically uninstalling everything and reinstalling resolved this, so I'm closing for now. Thanks.