thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.13k stars 168 forks source link

(is it) mod-card causing indivual cards inside a custom:swipe card to not appear #250

Closed Mariusthvdb closed 1 month ago

Mariusthvdb commented 1 year ago

My Home Assistant version: 0.XX.X 2023.1.6 My lovelace configuration method (GUI or yaml): Yaml What I am doing:

styling (mod-card) a custom:swipe-card

What I expected to happen: have swipe card show all defined cards

What happened instead:

using mod-card (even without any styling at all) causes the following pattern consistently row 1: V | X | V | V row 2: V | V | V | X | X row 3: V | V | V | V row 4: X | V | V | V

where X stands for a non displayed card.

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error
        - type: custom:mod-card
          card:
            type: custom:swipe-card
            cards:
              - type: custom:button-card
              - type: custom:button-card
              - type: custom:button-card
              - type: custom:button-card
# End of code

Error messages from the browser console:

No errors at all

as if this isnt strange enough, I accidentally discovered I can make these individual (custom:button-card) cards appear, by adding some additional styling.

              - type: custom:button-card
                entity: switch.espresso_keuken
                template: plattegrond
                variables:
                  path: /ui-sub-views/keuken
                  picture: keuken_detail_klein.jpg
                  tooltip: Keuken
#fake style so mod-card does not take out this card......
#                 styles:
#                   card:
#                     - border-top: >
#                         [[[ return (states['binary_sensor.laundry_sensor_motion'].state == 'on')
#                             ? 'none' : 'none'; ]]]

This styling in itself is again very peculiar, because changing aspects inside that template (entity, return, state) can make it work or not work. No logic found just yet

also, I tried to take out the 5th card in the 2nd row , thinking it might have been asymmetrical, but that has no consequence.


By putting an X in the boxes ([]) below, I indicate that I:

For a more elaborate description I've made a community post.

Mariusthvdb commented 1 month ago

closing as no longer used.probably swipe card so not the right place.