lovelace-cards icon indicating copy to clipboard operation
lovelace-cards copied to clipboard

Cannot assign to read only property 'id' of object '#<Object>'

Open antoinevandenhurk opened this issue 5 years ago • 12 comments

Since release HA release 0.106.1 has an error occurred (Cannot assign to read only property 'id' of object '#<Object>') in my lovelace configuration. I have used the config of Tom with de tiles-card script. Is a new version of tiles-card.js coming?

resources:

  • type: js url: /local/tiles-card.js?v=0.1

https://community.home-assistant.io/t/kodi-remote/97652/19?u=antoinevandenhurk

antoinevandenhurk avatar Feb 29 '20 05:02 antoinevandenhurk

Same problem here.

Flavien avatar Mar 01 '20 22:03 Flavien

This is likely due to the following change in 0.106:

Custom cards

Are you the creator of an awesome custom card for Lovelace?

We have made some changes to Lovelace that might impact your custom card, so be sure to read the blog post 21 on the developers site about this.

Blog post link: https://developers.home-assistant.io/blog/2020/02/18/106-custom-card-changes.html

The last time this card was maintained was 15 months ago. It may be abandoned. 😬

I hope not. I find it very useful and a lot more intuitive to use than the custom button card and have made extensive use of it.

tomlut avatar Mar 04 '20 05:03 tomlut

Same problem is here. Very convenient card, hope the correction will be done asap.

Spirituss avatar Mar 04 '20 13:03 Spirituss

Pretty sure this card is abandoned, button-card is the closest (complicated) replacement.

tomlut avatar Mar 05 '20 09:03 tomlut

Please Help, I have extensive use of TILES.

image

gtivr4 avatar Mar 05 '20 10:03 gtivr4

Pretty sure this card is abandoned, button-card is the closest (complicated) replacement.

Unfortunately, button-card can't work with different vertical entity sizes and common grid for the group of entities. Other features can be substituted by custom-card.

Spirituss avatar Mar 05 '20 10:03 Spirituss

Time to face facts folks. This card is dead.

Possible replacements:

Full featured and complicated: https://github.com/custom-cards/button-card

A less complicated but less feature rich version: https://github.com/custom-cards/button-entity-row

tomlut avatar Mar 14 '20 03:03 tomlut

Using some of the information that @thomasloven wrote up about the config changes in 0.106, I added one line of code to this card and it works like a champ. Right after line 15, which is the first line in the codeblock below, add the config = JSON.parse(JSON.stringify(config));

setConfig(config) {

    config = JSON.parse(JSON.stringify(config));

    if(!config.entities) {
        throw new Error('Please define your entities');
    }

Note: pls disregard the other committed files in the above-linked commit as I committed an update to HACS at the same time. I'll also try and find the info @thomasloven wrote up where I got that line of code and link to it.

chipriley avatar Mar 14 '20 03:03 chipriley

Here's the essential part of where I got the code from @thomasloven. All credit goes to him for my band-aid fix.

chipriley avatar Mar 14 '20 03:03 chipriley

Awesome! Thanks for the fix. It certainly gives me time to consider if I should continue to use this card.

tomlut avatar Mar 14 '20 06:03 tomlut

Unfortunately this did not fix it for me. It's still failing to display. Now with "Attempted to assign to readonly property".

EDIT: strangely this only appears to be an issue with the IOS app. Firefox is fine.

EDIT2: Resetting the app's frontend cache did not fix it but pulling down on the display to refresh did. Very odd.

Either way this unsupported app is only going to get flakier. This weekend's task will be to rid myself of it.

tomlut avatar Mar 17 '20 15:03 tomlut

You guys should really change over to the custom button card. I have exactly what I did before (and even some nice enhancements, like more info pop-up on hold) except using literally hundreds less lines of Lovelace code.

tomlut avatar May 11 '20 08:05 tomlut