kinghat / tabbed-card

a custom card for home assistant that utilizes tabs to segregate individual cards.
MIT License
87 stars 10 forks source link

Invalid Default Lovelace YAML Config #100

Closed mathmaniac43 closed 9 months ago

mathmaniac43 commented 1 year ago

Hello!

This card is great! I noticed an issue when I set up a new instance of it today that might confuse new users. I am using v0.3.1 via HACS.

When I create a new tabbed card, it defaults to the following YAML:

type: custom:tabbed-card
options: {}
tabs:
  - label: Sun
    card:
      type: entity
      entity: sun.sun

This causes the card's label to be unpopulated!

Screenshot_20230418-111824.png

The solution is to move label under attributes, which you do document well in your README. It would be better if the default YAML config matched the docs.

type: custom:tabbed-card
options: {}
tabs:
  - attributes:
      label: Sun
    card:
      type: entity
      entity: sun.sun

Screenshot_20230418-112345.png

I did notice that when I updated the card's YAML in the mobile editor, it did not immediately display the change to the label on the tab. I had to save, and then it looked correct on the dashboard and when I re-opened the editor.

Best, Nick