Make a custom card (iCloud3)

Hi All,

I can’t figure it out … I’ve been working on the installation configuration for a few days now. I follow the installation steps by this guide:. I do the installation via HACS, that’s fine. I don’t use ui-lovelace.yaml so I add the resources through: Configuration - Lovelace Dashbord - Resource. I think this works.
Then I have to add the custom card (so not via the ui-lovelace.yaml), so create it via manual card. the following code I add but then I get all error messages that I do not get out, no matter how many spaces I use for line 4, error message remains…

and

I already search the web , this topic , other topics but I can’t find a solution , maybe my search is not good enough ?

Remove the dash before title. The dash is implied because your at the single card level.

Actually there’s a lot wrong with your yaml. And I’m on the phone so writing it out for you won’t be possible.

You should just have type and entity, no dashes anywhere

Also, I just looked at that guide… man is it wrong. Don’t trust documentation outside the the custom cards documentation or official documentation.

Edit: it seems that’s actually the github installation page. I’d write some issues against the documentation. The yaml formatting it is is just not correct.

:worried: What should I do if the guide is not good? …

I hope there is someone who has succeeded … (With the necessary adjustments)

Try what I said. Just have type and entity in your card configuration.

I tried to remove the dash, unsuccessful, then I read the guide again and it says that I should actually do it differently, if I want to make this card and I don’t use the ui-lovelace.yaml file then I have to do the following:

Hit the three dots button twice (once to edit UI, next to open raw editor). Paste the required configuration at the top of this file (above everything else)

I did that , but again no luck

I will put my question in the topic where this addon is discussed. Surely more people will have run into this problem

Thanks for your help so far.

If you stopped posting images and posted your code, I could help more. Also, I’ve said it twice now: only use type and entity.

Edit your UI, click the plus to add a card. Select manual at the bottom. Then fill in the following fields

I added the pictures to show the error message clearly, it will no longer do if it is considered to be disturbing. Sorry

I did what you said, only type and entity…

type: custom:icloud3-event-log-card
entity: sensor.icloud3_event_log

when I hit save, all other cards are gone , but come back after a refresh. The new made card is not visible.

Pictures are not good because people have to recreate your code by hand. Posting your code as text with proper formatting allows people to correct your mistakes without too
Much of a hassle.

—-

If your card is not showing, your resource is not correctly specified. The directions on that page are for HACS, and they are using the outdated HACS directory pathing. If you don’t have HACS, those path links don’t exist. I’m guessing you don’t have hacs installed. It would be wise to install it, it does all the installation for you with custom integrations/cards

—-

On mobile so this is a pain to navigate for me. Anyways, here is the link for HACS

I should have reported it but I installed it with HACS …
I added the resource via configuration, lovelace dashboard, resources.

Sorry for delay, out on a bike ride. What are you using as the url for the resource?

/local/custom_cards/icloud3-event-log-card.js?v=1.000

Resource type:
Javascript module

That doesn’t seem like the hacs url.

The url should look like this

/hacsfiles/bar-card/bar-card.js

Which linkA to the install location config/www/community/bar-card/bar-card.js

The community directory might have a different name. Going off memory.

3. Click Install. This will install all of the custom component files above into the 'config/custom_components/icloud3' directory on your Raspberry Pi or the device you are running Home Assistant on.

This is in the guide I followed …
And then installing the card:

Installing the iCloud3 Event Log Custom Card
Custom Lovelace cards are typically stored in the /www/custom_cards directory. Do the following:

Create the /www/custom_cards directory if it does not exist.

Copy the icloud3-event-log-card.js into the /www/custom-cards directory. If you are installing iCloud3 using HACS, the file is in the custom_components/icloud3 directory. If you are already using custom cards and they are in a different directory, copy the icloud3-event-log-card.js file into the one you are using.

Open the ui-lovelace.yaml file and add the following lines to the beginning of the file. Again, change the directory name if you are using a different location.

resources:
  - url: /local/custom_cards/icloud3-event-log-card.js?v=1.000
    type: js
Copy to clipboardErrorCopied
Add the following lines to the ui-lovelace.yaml file to create the custom card.

 - title: iCloud Event Log
    icon: mdi:information-outline 
    cards: 
      - type: custom: icloud3-event-log-card
        entity: sensor.icloud3_event_log

Did you verify that it actually did what it said? Remember, hacs is the manager. It has nothing to do with what’s written in that guide. Hacs has constantly changed over the past year.

Also everything about this configuration is incorrect. Do not follow it. Create the card in the way I listed above.

I would expect your url to be

/hacsfiles/icloud3-event-log-card/icloud3-event-log-card.js