custom-cards / decluttering-card

🧹 Declutter your lovelace configuration with the help of this card
MIT License
379 stars 29 forks source link

s is undefined #5

Closed BaQs closed 5 years ago

BaQs commented 5 years ago

I get this error when trying to define a simple template:

ui-lovelace.yaml:

decluttering_templates:
  test:
    card:
      - type: sensor
        entity: '[[sensor_temperature]]'
        name: test

the card:

type: 'custom:decluttering-card'
template: test
variables:
  - sensor_temperature: sensor.synology_dsm_cpu_load_total

the error: s is undefined


{
  "type": "custom:decluttering-card",
  "template": "test",
  "variables": [
    {
      "sensor_temperature": "sensor.synology_dsm_cpu_load_total"
    }
  ]
}

the console log:


decluttering-card TypeError: "s is undefined"
    setConfig decluttering-card.js:209
    Ei create-card-element.ts:73
    xi create-card-element.ts:98
    createCardElement hui-view.ts:75
    _rebuildCard hui-view.ts:322
    createCardElement hui-view.ts:83
    r fire_event.ts:76
    xi create-card-element.ts:111
create-card-element.ts:76:12
BaQs commented 5 years ago

Ok, sorry for the noise. I used "- type: sensor" , instead of: "type: sensor"