UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.6k stars 428 forks source link

card_scenes_welcome - Button-card JS error #1195

Open spluft opened 1 year ago

spluft commented 1 year ago

I got error:

button-card.js:425 ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'entity_id') in 'if(entity.entity_id.startsWith("scene.")){
    return "scene.turn_on"
  }
LaUr3nTiU commented 10 months ago

This issue is still present.

This happens when we provide less than 7 entities. Below is one example which passes a null entity which makes button-card to fail:

entity: "[[[ return variables.entity_7.entity_id ]]]"

is there any possibility to conditionalize item7 (or any other items for that matter)?