custom-cards / button-card

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

code turns into array after reboot #665

Closed Pocky0013 closed 1 year ago

Pocky0013 commented 1 year ago

Checklist

Describe the bug code turns into array after reboot and no longer works

Version of the card Version: 3.4.2

I have the following code, with the following snippet Capture d’écran 2023-03-17 à 17 26 41

styles:
  card:
    - background-color: '#17AB48'
    - height: 25px

after a reboot of HA or in a random way that I haven't figured out yet. The code display the error in faulty code of the transformation into array of tags.

styles:
  card:
    '0':
      background-color: '#17AB48'
    '1':
      height: 25px

Capture d’écran 2023-03-17 à 17 26 00

If I change delete display to array to put back one "- " everything works again

RomRider commented 1 year ago

This seems to have nothing to do with button card but with a bug in the editor of HA. I'm closing this here. Please open an issue in the frontend repo of HA if you still have the issue.