amaximus / garbage-collection-card

Custom Lovelace card for Garbage Collection custom component
MIT License
128 stars 24 forks source link

Lovelace black screen after adding 'custom:garbage-collection-card' #66

Closed TheIronRock95 closed 3 years ago

TheIronRock95 commented 3 years ago

Describe the bug Hello,

I am trying to get the custom-card "garbage-collection-card" in lovelace only when I add the card I get a black empty dashboard. I have installed the garbage-collection-card through HACS and added the Resources under lovelace/resource

/hacsfiles/garbage-collection-card/garbage-collection-card.js

The lovelace dashboard config for the garbage card is:

      - type: 'custom:garbage-collection-card'
        entity: sensor.afvalinfo_pbd
        icon_size: 35px
        icon_color: green

Another custom card 'custom: simple-thermostat' does work fine in the dashboard.

To answer the questions for: Community home assistant

sensor.afvalinfo_pbd is an attributes under Developer Tool: image

The browser console is giving me the following error: image

The black and empty dashboard: image

amaximus commented 3 years ago

Please note that the garbage-collection-card was written to support the custom Garbage Collection integration [1], thus expecting state value and attributes as provided by [1]. According to your screenshot, the sensor.afvalinfo_pbd (and the similar ones) is not provided by the custom Garbage Collection integration [1], your sensor has different state value and attributes, that's why it doesn't work. I will still issue a fix to avoid the above error. The card can work with sensor of other integrations as long as the state value and attributes are as expected by [1].

[1] https://github.com/bruxy70/Garbage-Collection/

TheIronRock95 commented 3 years ago

Ah okey, will check it out!! The black screen is fixed so thanks 🙃