Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add cards in pre-existing panel #5295

Closed
3 tasks done
fudu opened this issue Mar 20, 2020 · 8 comments · Fixed by #5307
Closed
3 tasks done

Cannot add cards in pre-existing panel #5295

fudu opened this issue Mar 20, 2020 · 8 comments · Fixed by #5307
Labels
Bug Current Bug in UI - Extra Attention

Comments

@fudu
Copy link

fudu commented Mar 20, 2020

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

The problem

As in subject, when I try to add a card on preexisting Panel, get message "Which card .. etc etc", but nothing to choose, as in attached image.
If I create a new panel it goes fine

Expected behavior

Card list

Steps to reproduce

Click Configure UI
Click + button to add Card

Environment

Cattura

  • Home Assistant release with the issue: 0.107.1 - 0.107.2
  • Last working Home Assistant release (if known): latest 0.106
  • Browser and browser version: Tried with different browser - Chrome, Firefox, Edge
  • Operating system: Client various - server: Vm on Qnap virtualization station

Problem-relevant configuration

Javascript errors shown in your browser console/inspector

Additional information

@fudu fudu added the Bug Current Bug in UI - Extra Attention label Mar 20, 2020
@zsarnett
Copy link
Contributor

Are there any logs in the console of the browser?

What are the settings of that view? is it in Panel Mode?

@bramkragten
Copy link
Member

Any custom cards?

@fudu
Copy link
Author

fudu commented Mar 20, 2020

Are there any logs in the console of the browser?

When I try to add cards get message in web console

  • compute-unused-entities.ts:54 Uncaught (in promise) TypeError: t.cards.forEach is not a function at o (compute-unused-entities.ts:54) at compute-unused-entities.ts:54 at Array.forEach (<anonymous>) at o (compute-unused-entities.ts:54) at compute-unused-entities.ts:54 at Array.forEach (<anonymous>) at o (compute-unused-entities.ts:54) at compute-unused-entities.ts:66 at Array.forEach (<anonymous>) at a (compute-unused-entities.ts:66)

What are the settings of that view? is it in Panel Mode?

No, standard view

@fudu
Copy link
Author

fudu commented Mar 20, 2020

Any custom cards?

No cards at all
Attached different choices trying add cards in Preexisting Panel and in a new Panel
Cattura2
Cattura1

@bramkragten
Copy link
Member

bramkragten commented Mar 20, 2020

You have an error in your config, something should be an array but isn't.

Check for a cards that is not an array.

We should add a check for this in the code like I did for entities.

@fudu
Copy link
Author

fudu commented Mar 21, 2020

You have an error in your config, something should be an array but isn't.

Check for a cards that is not an array.

We should add a check for this in the code like I did for entities.

..?
Sorry, but I don't understand what you mean or how to do it.....

@bramkragten
Copy link
Member

Check your Lovelace config for cards: there is at least one in there that does not have a list. (as it is plural it should be a list)

@fudu
Copy link
Author

fudu commented Mar 22, 2020

here is at least one in there that does not have a list. (as it is plural it should be a list)

I found what is the cause of the issue: a conditional card
`cards:

  • entity: input_boolean.riscaldamento_manuale_on
    name: Riscaldamento Manuale
    style:
    • font-size: 12px
    • font-weight: bold
      tap_action:
      action: toggle
      type: entity-button
  • card:
    cards:
    - entity: input_boolean.riscaldamento_away_on
    name: test
    tap_action:
    action: toggle
    type: entity-button
    - entity: input_boolean.riscaldamento_festa_on
    tap_action:
    action: toggle
    type: entity-button
    type: horizontal-stack
    cards: conditional
    conditions:
    • entity: input_boolean.riscaldamento_manuale_on
      state: 'on'
      type: conditional
  • card:
    cards:
    - entity: input_boolean.riscaldamento_estate_on
    tap_action:
    action: toggle
    type: entity-button
    - entity: input_boolean.riscaldamento_antigelo_on
    tap_action:
    action: toggle
    type: entity-button
    type: horizontal-stack
    cards: conditional
    conditions:
    • entity: input_boolean.riscaldamento_manuale_on
      state: 'on'
      type: conditional
      title: null
      type: vertical-stack`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants