lovelace-xiaomi-vacuum-map-card: Error for default vacuum platform with Neato bots
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
… assumes that there’s a fan_speed_list attribute on the vacuum, which is optional in the vacuum device type for HA. Neato botvacs, in particular, don’t have said attribute. Seems like checking for null and omitting the fan speed icon would be the safe thing here.
What version of a card has described problem?
2.0.8
What was the last working version card?
No response
What vacuum model do you have problems with?
Neato Botvac D7
Which integration do you use to control your vacuum (link)?
https://www.home-assistant.io/integrations/neato/
What browser (browsers/apps) does have this problem?
All
What version of Home Assistant do you use?
2021.12.1
What type of installation are you running?
Home Assistant Container
Card’s configuration
No response
Javascript errors shown in the browser’s console (if applicable)
xiaomi-vacuum-map-card.js?hacstag=193372044208:557 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
at Function.generate (xiaomi-vacuum-map-card.js?hacstag=193372044208:557)
at HTMLElement._setPresetIndex (xiaomi-vacuum-map-card.js?hacstag=193372044208:836)
at HTMLElement._firstHass (xiaomi-vacuum-map-card.js?hacstag=193372044208:836)
at HTMLElement.set hass [as hass] (xiaomi-vacuum-map-card.js?hacstag=193372044208:836)
at HTMLElement.value (hui-masonry-view.ts:44)
at hui-masonry-view.ts:44
at Array.map (<anonymous>)
at HTMLElement.value (hui-masonry-view.ts:44)
at HTMLElement.value (hui-masonry-view.ts:44)
at HTMLElement.value (hui-masonry-view.ts:44)
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 33 (19 by maintainers)
My bad. Apparently you can’t just replace the file when it was installed with HACS. I had to delete the matching .gz file that HACS creates (and serves) when it installs a frontend component. Once I deleted the .gz, it started serving the .js file.
…aaaaaand… IT WORKS!
Thanks for all the help man. So stoked to have this working.
Here’s an example of a working config on Neato:
Note this doesn’t handle segment cleaning yet. It just shows the segments and allows selection.
Here’s the result: