Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button card with custom_fields disappear when refreshing the page #836

Open
2 tasks done
mitsu98 opened this issue Mar 9, 2024 · 4 comments
Open
2 tasks done

Button card with custom_fields disappear when refreshing the page #836

mitsu98 opened this issue Mar 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mitsu98
Copy link

mitsu98 commented Mar 9, 2024

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser

Describe the bug
Button card with custom_fields disappear when refreshing the page
HA 2024.3.0

To Reproduce
This is the configuration I used:

views:
  - title: Home
    cards:
      - type: custom:button-card
        name: Test
        label: Test
        custom_fields:
          camera:
            card:
              type: picture
              image: https://demo.home-assistant.io/stub_config/t-shirt-promo.png
    theme: Metro Slate
    path: home
    subview: false
button-card.js?hacstag=146194325412:426  TypeError: Cannot read properties of undefined (reading 'style')
    at button-card.js?hacstag=146194325412:426:18867
    at Ti._createCard (button-card.js?hacstag=146194325412:426:19038)
    at button-card.js?hacstag=146194325412:445:213
    at Array.forEach (<anonymous>)
    at Ti._buildCustomFields (button-card.js?hacstag=146194325412:445:30)
    at Ti._gridHtml (button-card.js?hacstag=146194325412:524:25)
    at Ti._buttonContent (button-card.js?hacstag=146194325412:506:454)
    at Ti._cardHtml (button-card.js?hacstag=146194325412:486:18)
    at Ti.render (button-card.js?hacstag=146194325412:426:19509)
    at Ti.update (button-card.js?hacstag=146194325412:1:14818)
button-card.js?hacstag=146194325412:426  Uncaught (in promise) TypeError: e.setConfig is not a function
    at Ti.render (button-card.js?hacstag=146194325412:426:19640)
    at Ti.update (button-card.js?hacstag=146194325412:1:14818)
    at Ti.performUpdate (button-card.js?hacstag=146194325412:1:6145)
    at Ti.scheduleUpdate (button-card.js?hacstag=146194325412:1:5792)
    at Ti._$Ej (button-card.js?hacstag=146194325412:1:5700)

Screenshots
vid (1)

@mitsu98 mitsu98 added the bug Something isn't working label Mar 9, 2024
@Rainerlan
Copy link

Same for me - I'll delete my bug-ticket...

@ablohm
Copy link

ablohm commented Mar 22, 2024

I also have this issue. This is killing my dashboard.

@kizovinh
Copy link

Same for me, the card sometime doesn't show up, I have to refresh several times until it come. If open chrome dev tools, it will never come

@bendiksolheim
Copy link

bendiksolheim commented May 5, 2024

I have the same problem. Unsure what’s causing it, but the error is more or less the same.

My dashboard has several views/tabs. If I refresh the tab with this exact card on, I get an error. If a different view/tab is active, I can refresh and switch to the troubling view/tab and everything is fine. This makes me think there is some timing issue.

EDIT: I believe I have narrowed it down to the picture card specifically. It may be a problem with other cards as well, but I managed to get entity cards and sensor cards working without this error. Switching the card back to a picture card immediately gives me the error again. Also, it does not matter how I reference the image. I have tried images served from HA, served from a different URL, and data URIs. They all give the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants