JonahKr / power-distribution-card

A Lovelace Card for visualizing power distributions.
MIT License
219 stars 13 forks source link

Custom Card in center panel fails if not loaded in Tab. #161

Open thamesseb2 opened 10 months ago

thamesseb2 commented 10 months ago

hi im trying to add a picture in center like:

center:
  type: card
  content:
    type: picture
    image: /local/foto-pkg/zcs.png

but this give me custom element don't exist, is a bug or i worong something?

neotigger commented 10 months ago

Definitely not a bug. Bildschirmfoto 7

thamesseb2 commented 10 months ago

image so probably i wrong something

neotigger commented 10 months ago

I have to correct myself. For example, the card alone on a dashboard, the error occurs. Together with other cards, it works Bildschirmfoto 8 Bildschirmfoto 9

thamesseb2 commented 10 months ago

Thank goodness, I was going crazy :D

buanet commented 10 months ago

Can confirm this. If I use the picture card in center I get the same error. When you add a the same picture as a standalone picture card on the same dashboard it works.

Using a picture-entity card instead seems to work for me.

center:
  type: card
  content:
    type: picture-entity
    image: /local/s10.png
    entity: [some.dummy.entity]
    show_state: false
    show_name: false
    camera_view: auto
    tap_action:
      action: none
    hold_action:
      action: none

regards, André

JonahKr commented 10 months ago

Hi all! Thanks for the report. I was able to replicate this issue, but I am not 100% sure why this occurs. I will have to debug this, but sadly, I currently don't have that much spare time. Stay safe!