button-card: Bug after adding the card to lovelace new storage mode

Hi there, first of all thanks for that hard work on this! Whenever i add this card to the UI i cant use the raw config editor anymore. I can add it can save it 1

But after it has been added and i wanne edit it again, i cant: it keeps loading the card config: 2

I also cannot use the raw editor then, it just seems blank. 5 3

When i remove the card, im able to view the raw config and edit it again…

Removed card: 6

RAW Editor: 7

Does this card only work in the YAML mode?

EDIT: Meanwhile i have found out that the problem only occurs when i open the view with the actual card. i can use RAW edit on all other views as long as i wont go to that view that holds the button-card. Once i have opened the view, i think the card loads and things brake. After that when i go back to check config, the config seems fine and i can open the raw editor again from all the other views till the moment i open the view with this card again, I hope u understand me, my language is not native English.

Here is the card config:

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: sensor.harmony_activity
  - type: horizontal-stack
    cards:
    - type: custom:button-card
      entity: script.woonkamer_movies_tvshows
      icon: mdi:kodi
      color: rgb(0, 150, 255)
      color_off: rgb(0, 150, 255)
      name: Movies & TV Shows
    - type: custom:button-card
      entity: script.start.kodi
      icon: mdi:kodi
      color: rgb(0, 150, 255)
      color_off: rgb(0, 150, 255)
      name: Start Kodi
    - type: custom:button-card
      entity: script.woonkamer_ziggo_tv
      icon: mdi:television
      color: rgb(255, 140, 255)
      color_off: rgb(255, 140, 0)
      name: Ziggo TV
  - type: horizontal-stack
    cards:
    - type: custom:button-card
      entity: script.script.netflix_living_room
      icon: mdi:netflix
      color: rgb(255, 0, 0)
      color_off: rgb(255, 0, 0)
      name: Netflix
    - type: custom:button-card
      entity: script.woonkamer_spotify
      icon: mdi:spotify
      color: rgb(0, 255, 0)
      color_off: rgb(0, 255, 0)
      name: Spotify
    - type: custom:button-card
      entity: script.woonkamer_youtube
      icon: mdi:youtube
      color: rgb(255, 0, 0)
      color_off: rgb(255, 0, 0)
      name: Youtube
  - type: horizontal-stack
    cards:
    - type: custom:button-card
      entity: script.woonkamer_shutdown
      icon: mdi:power
      color: rgb(150, 150, 150)
      color_off: rgb(150, 150, 150)
      name: Shutdown

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

thanks for the fix! its indeed working perfect now