amaximus / garbage-collection-card

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

[BUG] #65

Closed turbotopo closed 3 years ago

turbotopo commented 3 years ago

please update your installation guide. we cannot add resources to configuration.yaml.

Please also show how to add the card to the ui.

thanks for your nice project ;-)

amaximus commented 3 years ago

Added some instructions for non-yaml configuration.

Please check and get back to me with results.

amaximus commented 3 years ago

Any update on this issue?

kizio1000 commented 3 years ago

Still can't get card working. "No card type configured" When added resource as below in Configuration->Lovelace dashboards->Resources->Add resource:

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

amaximus commented 3 years ago

Can you post the card definition from your dashboard?

kizio1000 commented 3 years ago

It works only for one entity with code below:

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

If tried to use two or more entietes with code below then it is giving error obraz_2021-01-22_190133

amaximus commented 3 years ago

Please note that your indentation is wrong, one level down it should be 2 chars. Setting it on UI it still ends up in yaml. Something like:

cards:
  - type: custom:garbage-collection-card
     entity: ....
     ....
  - type: custom:garbage-collection-card
     entity: ....
     ....
kizio1000 commented 3 years ago

When indentation is wrong, then yaml editor of UI will give according error. In situation above I am getting "No card type found" error.

Should I also manifest this card anywhere else than in Configuration->Lovelace dashboards->Resources ?

amaximus commented 3 years ago

I'm not familiar with the UI mode (I'm a yaml guy), so I might have been wrong regarding the indentation.

As for the card it should be added to the resources as js (not module, however it might work with module setting as well), restart HA to have the add resource in effect and you should be able to use the card.

What OS are you using with what browser? Have you tried to clean up your browser's cache and reload the view?

kizio1000 commented 3 years ago

Seams that it's UI editor issue. After messing around with indentation I got error like below.

card

amaximus commented 3 years ago

Yes, the card does not support the config flow.

amaximus commented 3 years ago

@kizio1000 , did you manage to get the card displaying as it should?

simonwicks commented 3 years ago

I had a bit of trouble this this as well as an utter novice to this kind of thing, but did manage to get it to work after some tinkering.

I added via HACS, and added it as a resource in configuration/resources. Added as a manual card, and used it in the following format, I had to take out the cards: line to get it to work. I don't know how to get two entities to show in the same card, so have added the two bins I havce as seperate cards for now.

Capture

amaximus commented 3 years ago

Please note that this card doesn't support multiple sensors, thus you wont'be able to display two bins in one card.

As an alternative - giving up on this card - you may accomplish two bins in one card (so to say) by using horizontal stack and button card (or better yet custom:button-card that gives you much more flexibility). You may combine these with conditional card if you want the bins to appear just couple of days before the upcoming pick-up day.

triplezulu commented 3 years ago

Hi @amaximus ! First of all... thanks for gr8 project! It will make my whole family happy ;) I just got the same problem as described above. I've added the card via HACS. All is in place (files and lovelace dashboard resource) but when I add the line to configuration.yaml - I got this error while checking config (Component error: resources - Integration 'resources' not found) what should I do ?

amaximus commented 3 years ago

Hi @triplezulu !

Please make sure you restart HASS after adding the resource. Could you post here the resources part, the sensor configuration and the card configuration?

triplezulu commented 3 years ago

@amaximus I've made it! After 2 weeks of thinking ;) Thank you so much for your great job buddy!

amaximus commented 3 years ago

Glad to hear that.