Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working with 0.106 #32

Closed
Schluggi opened this issue Feb 28, 2020 · 8 comments
Closed

not working with 0.106 #32

Schluggi opened this issue Feb 28, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@Schluggi
Copy link

Hi,

in 0.106 some changes happend to customs cards: https://developers.home-assistant.io/blog/2020/02/18/106-custom-card-changes/

After upgrading from 0.105 to 0.106 i got this error in the ui:

can't define property "service": Object is not extensible

type: 'custom:xiaomi-vacuum-card'
entity: vacuum.sucker
name: Sucker
image: false
buttons: true
labels:
  status: Status
  battery: Batterie
  mode: Modus
  main_brush: Main Brush
  side_brush: Side Brush
  filter: Filter
  sensor: Sensor
@benct
Copy link
Owner

benct commented Feb 28, 2020

Thanks for reporting this, will try to fix asap.

@benct benct added the bug Something isn't working label Feb 28, 2020
@benct benct pinned this issue Feb 28, 2020
@Schluggi
Copy link
Author

Strange. Now the card is working fine again. Maybe this was my fault.

@sookis
Copy link

sookis commented Feb 29, 2020

I still have the exact same error since 0.106

Strange. Now the card is working fine again. Maybe this was my fault.

I still have this error

@ishockwave
Copy link

Not working for me either.
This is the error message from the javascript console:

xiaomi-vacuum-card TypeError: Cannot add property service, object is not extensible
at HTMLElement.setConfig (xiaomi-vacuum-card.js?v=2.2.1:197)
at _createThing (card-tools.js:102)
at Function.createThing (card-tools.js:132)
at Function.createCard (card-tools.js:153)
at layout-card.js:82
at Array.map ()
at HTMLElement.make_cards (layout-card.js:80)
at HTMLElement.setConfig (layout-card.js:16)
at o (create-element-base.ts:61)
at a (create-element-base.ts:80)
at l (create-element-base.ts:131)
at Hi (create-card-element.ts:88)
at HTMLElement.value (hui-panel-view.ts:55)
at HTMLElement.value (hui-panel-view.ts:34)
at HTMLElement.performUpdate (updating-element.ts:704)
at HTMLElement._enqueueUpdate (updating-element.ts:653)

@basti88bbl
Copy link

same Prob here :-(

@ishockwave
Copy link

ishockwave commented Mar 3, 2020

Just noticed I was using an old version.
After updating to the latest it started working fine again!

The old one was using code like
this.service = Object.assign({}, services, vendor.service);
which is now prohibited for speed reasons.
The new version does not do that and is therefor working (for me at least)

@MakkaKaplar
Copy link

Had this problem a few days ago, working fine since last updates.

@benct
Copy link
Owner

benct commented Mar 4, 2020

This is an issue with an older version of the card, as mentioned by @ishockwave. Upgrade and/or reinstall the card, clear browser caches and restart your HA instance if it still doesn't work.

@benct benct closed this as completed Mar 4, 2020
@benct benct unpinned this issue Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants