Samantha-uk / zigzag-v1

Zigzag - See a graphical representation of your Home Assistant Zigbee network.
MIT License
16 stars 3 forks source link

What do you call the custom card in Lovelace? #2

Closed broyuken closed 4 years ago

broyuken commented 4 years ago

What do you name it to add the custom card in Lovelace? I’ve tried

custom:zigzag custom:zigzag-card custom:zigzag-panel

but they don’t work.

boralyl commented 4 years ago

I believe you want to use custom:custom-card-zigzag

broyuken commented 4 years ago

Nope, that didn't work

boralyl commented 4 years ago

Not sure which method you are using for lovelace (ui or yaml) but I just tested it out and custom:custom-card-zigzag is correct. Although I think this works much better as a panel than a card, especially if you have more than a few devices. If you wanted to use the card and use yaml mode all I had to do was:

cards:
  - type: custom:custom-card-zigzag

Don't forget to add the javascript module either in the UI or in configuration.yaml:

lovelace:
  mode: yaml
  resources:
    - url: /local/zigzag/zigzag-card.js
      type: module
broyuken commented 4 years ago

I ended up moving the js file up a directory, it was in /config/www/community with all my others, and even though I referenced it explicity in resources it didn't matter until I changed it to /local/zigzag/zigzag-card.js. Anyways, now it works. Thanks for clarifying. The documentation should probably be updated to include this.

Also, side note I am using this as a panel, I just didn't want it on the side. It's a new view in panel mode.