#known frontend bug button-card issue

1 messages · Page 1 of 1 (latest)

scarlet trout
#

Today I tried to finetune my card but I was getting this error:

TypeError
Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a Symbol.iterator method.

This problem was years ago there aswell and i was hopinh if i can on some way help debug it.

type: custom:button-card
entity: button.coffee_power_toggle
name: Coffee Power
state:
  - value: "on"
    color: green
  - value: "off"
    color: gray
styles:
  grid:
    - grid-template-areas: "\"battery\" \"name\""
    - justify-items: center
  custom_fields:
    battery:
      position: absolute
      top: 5%
      right: 5%
      font-size: 12px
      color: white
custom_fields:
  battery: |
    [[[ 
      return `<ha-icon icon="mdi:battery" style="font-size: 14px;"></ha-icon> 
      ${states['sensor.coffee_power_toggle_battery'].state}%`;
    ]]]
tap_action:
  action: toggle
#

has to do with
- grid-template-areas: ""battery" "name""

I already tried to change the user profile number format but that didn't help

This is a known frontend bug tied to auto number formatting, not dates or YAML syntax

#

known frontend bug button-card issue