button-card icon indicating copy to clipboard operation
button-card copied to clipboard

"button-card.js:1622 hui-error-card TypeError: n.setConfig is not a function" when using gauge card as custom Field

Open elgeniskogen opened this issue 4 years ago • 1 comments

Checklist

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

Describe the bug When I use a gauge card 'custom:flex-horseshoe-card' or as a custom_field I get a lot (many thousands) of “hui-error-card TypeError: n.setConfig is not a function” errors that stalls Safari or Chrome and the iOS Home Assistant app. This appen when i hit refresh/reload. The iOS Home Assistant app Get stuck on the feiling card and card has to be removed to start using the app again.

Version of the card Version: 3.4.2

To Reproduce This is the configuration I used:

- type: 'custom:button-card'
  aspect_ratio: 1/1
  custom_fields:
    graph:
      card:
        type: gauge
        entity: sensor.leaf_range_ac

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior Expected the gauge to show normally without jamming the browser.

Desktop (please complete the following information):

  • Browser [chrome & safari]
  • Version [latest]

Smartphone (please complete the following information):

  • Device: [ iPhone6 XS]
  • OS: [iOS14.5]
  • Browser [safari and app]
  • Version [latest]

Additional context Add any other context about the problem here.

elgeniskogen avatar Mar 30 '21 01:03 elgeniskogen

@elgeniskogen

I had a similar issue. At least in my case there was a dependency on https://github.com/iantrich/config-template-card

Once I installed that card things worked as expected. Its unclear if that is the issue in this exact situation.

Mitch9378 avatar Jan 23 '25 05:01 Mitch9378