amaximus / garbage-collection-card

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

[BUG] No card type found #70

Closed greghesp closed 3 years ago

greghesp commented 3 years ago

Not sure what the issue is here. I've gone into Hacs -> Frontend -and added the Garbage Collection Card. I've then gone to Lovelace Dashboards -> Resources and added /hacsfiles/garbage-collection-card/garbage-collection-card.js

HA has been rebooted and the manual card I am trying to add is below

cards:
  - type: 'custom:garbage-collection-card'
    entity: sensor.garden_2
    icon_size: 35px
    icon_color: green
    hide_date: true
  - type: 'custom:garbage-collection-card'
    entity: sensor.waste_2
    hide_before: 4
    icon_color: '#0561ba'
amaximus commented 3 years ago

Could you please make sure that sensor.garden_2 and sensor.waste_2 are of type garbage-collection as per [1]. The card expects states and attributes as per [1]. If you are using [1] for sensors and still face the issue, please check the browser console log and provide errors/warning that migth be related to this card. That would help a lot.

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

greghesp commented 3 years ago

I believe so. Each sensor was setup using the configuration UI

image

The only console logs are:

card undefined Error: No card type configured
    at d (chunk.455e79b014618741a716.js:2837)
    at c (chunk.455e79b014618741a716.js:2837)
    at a (chunk.455e79b014618741a716.js:2837)
    at HTMLElement.value (chunk.76c6271b07439f0dec52.js:2040)
    at chunk.76c6271b07439f0dec52.js:2040
    at Array.map (<anonymous>)
    at HTMLElement.value (chunk.76c6271b07439f0dec52.js:2040)
    at HTMLElement.value (chunk.76c6271b07439f0dec52.js:2040)
    at HTMLElement.performUpdate (app.924deda6.js:10297)
    at HTMLElement._enqueueUpdate (app.924deda6.js:10297)
c @ chunk.455e79b014618741a716.js:2837
amaximus commented 3 years ago

Have you tried to clear the browser cache and reload the page from server? Btw, what browser are you using?

greghesp commented 3 years ago

Yup, restarted HA and tried different browser and machine too. Using Chrome.

Doesn't appear to be anything in the logs either :/

greghesp commented 3 years ago

Fixed it. The example in your docs has incorrect indentation. This worked for me

cards:
type: 'custom:garbage-collection-card'
entity: sensor.garden_2
icon_size: 35px
icon_color: green
hide_date: true
amaximus commented 3 years ago

The documentation shows the yaml configuration and that's ok. I'm not sure how the UI based setup/configuration works.

remirr commented 3 years ago

@greghesp I am confused - have you worked out how to add multiple bins?

amaximus commented 3 years ago

You could use custom stack-in-card [1] card to add multiple bins that would look like one card.

[1] https://github.com/custom-cards/stack-in-card