custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.83k stars 227 forks source link

cards in horizontal-stack in custom_fields do not show up on page-refresh #840

Closed Rainerlan closed 3 months ago

Rainerlan commented 3 months ago

Checklist

Describe the bug I use grid-layout, where I added a button-card. The button-card contains within custom_fields another horizontal-stack with 2 entity-cards. When I use the side-bar to navigate to the dashboard, the 2 entities within horizontal-stack render fine. If I refresh the page in chrome however, I get the following console error and the entiries-card in horizontal-stack are gone: button-card.js:429 Uncaught (in promise) TypeError: e.setConfig is not a function

Version of the card Version: 4.1.2

To Reproduce This is the configuration I used:

views:
  - type: custom:grid-layout
    path: 0
    layout:
      margin: 0
      grid-gap: 15px
      grid-template-columns: 800px repeat(3, 1fr) 0fr
      grid-template-rows: 15px repeat(3, fit-content(100%)) 55px
      grid-template-areas: |
        "test aa bb cc ."
    cards:
      - type: custom:button-card
        name: Wohnzimmer und Küche
        view_layout:
          grid-area: test
        styles:
          custom_fields:
            tiny_buttons:
              - background-color: rgba(0,0,0,0.3)
              - margin: 0
              - padding: 0.3em
        custom_fields:
          tiny_buttons:
            card:
              type: horizontal-stack
              cards:
                - type: sensor
                  entity: sensor.multisensorsonoffwohnzimmer
                - type: sensor
                  entity: sensor.multisensorsonoffwohnzimmer_2

Screenshots

Botton-card-ok button-card-NOK

Expected behavior The display should always be the same

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context On the iphone chrome browser, the sensor-entites are displayed at every 2nd page refresh

Rainerlan commented 3 months ago

duplicate of [https://github.com/custom-cards/button-card/issues/836]