thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

How do I add a picture-entity? #170

Closed DivanX10 closed 2 years ago

DivanX10 commented 2 years ago

How do I write the code so that the collapse of the buttons with the image works?

image

If I do this, then I will have a round icon and a slider, and I need graphic buttons

type: vertical-stack
cards:
  - type: custom:fold-entity-row
    head:
      type: section
      label: Manual operation
    open: true
    entities:
      - image: \local\photo\person_01.jpg
        entity: input_boolean.virtual_tracing_person
        name: Person
        show_state: false
        show_name: false
        tap_action:
          action: call-service
          service: input_boolean.toggle
        service_data: null
        target:
          entity_id: input_boolean.virtual_tracing_person
        hold_action:
          action: more-info
        aspect_ratio: '0'
DivanX10 commented 2 years ago

You probably misunderstood me by closing this branch. I have not posted a solution, how is this done, I ask how to do it? I can't do it like in the screenshot. I just placed them side by side and it turned out that they are expanded, but in fact the buttons do not collapse. I have shown this for clarity. I posted the code for clarity, so that you understand what it is about and how you can do it correctly. I need your help.

image image

thomasloven commented 2 years ago

The very first line of the readme for fold-entity-row reads (emphasis added):

Fold away and hide rows in lovelace entities cards.

Your use case manages to break this twice, and you are therefore on your own.

See #146

thomasloven commented 2 years ago

This was also closed for not using the issue template - it does not look like a feature request to me.

DivanX10 commented 2 years ago

Yes, I have read your manuals more than once. I take all the examples from the main page and try to do everything. Writes Custom element doesn't exist: picture-entity. There is no clear example of how to use a picture-entity anywhere. There is also no mention of custom:picture-entity on the Home Assistant forum, otherwise I would not have asked. I can add all these switches, but the picture-entity can't figure out how to do it in any way.

image image image image

Please give a clear example of how to use picture-entity