Skip to content

Visual editor hides required card_type field and blocks card setup #482

Description

@Nicxe

Describe the bug
When adding the FormulaOne card through the Home Assistant visual editor, the required card_type field is not shown in the UI. Because of that, it is impossible to select a card type before saving, and the editor returns the error Please define FormulaOne card type (card_type).

To Reproduce
Steps to reproduce the behavior:

  1. Go to a Home Assistant dashboard.
  2. Click Edit dashboard
  3. Add a new card and select FormulaOne card.
  4. Open the visual editor and try to configure the card.
  5. Click Save.
  6. See error: Please define FormulaOne card type (card_type).

Expected behavior
The visual editor should show a visible selector for the required card_type field, so the user can choose the card type and save the card successfully.
Screenshots

Image

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser Chrome
  • Version v.1.14.3

Smartphone (please complete the following information):

  • Device: not tested
  • OS: not tested
  • Browser [not tested
  • Version not tested

Additional context
I looked through the code and the validation itself seems correct, since card_type is required. The issue appears to be in the visual editor. The editor defines card_type as a dropdown, but it is rendered using ha-combo-box, while the editor styles only seem to give explicit width handling to ha-textfield. That makes it look like the required selector is collapsing or not rendering visibly in the layout. A likely fix would be to give ha-combo-box the same width/flex handling as the text fields in the editor CSS.

But I am only guessing a little bit here, what we call “guy guessing” in Sweden, the art of guessing without really knowing, but still sounding like you know what you are talking about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions