[SOLVED] Javascript error with picture elements image

Hi,

I’m trying to setup a picture-elements card withing my lovelace UI.
I can’t make the image type element works while state-icon and state-badge are working fine.

I got this javascript error when loading the UI:

Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at HTMLElement._createHuiElement (2af5b1c2d5fbf8c18791.chunk.js:3940)
    at lit_element.c._config.elements.map.elementConfig (2af5b1c2d5fbf8c18791.chunk.js:3926)
    at Array.map (<anonymous>)
    at HTMLElement.render (2af5b1c2d5fbf8c18791.chunk.js:3926)
    at HTMLElement.update (app-6a2aa396.js:1191)
    at HTMLElement._validate (app-6a2aa396.js:1167)
    at HTMLElement._invalidate (app-6a2aa396.js:1167)

Here is my full ui-lovelace.yaml:

title: Lovelace
views:

  • title: Plan
    panel: true
    cards:
    • type: picture-elements
      image: /local/plan2.png
      elements:
      • type: state-badge
        entity: sensor.temperature_158d0001b922ad
        style:
        top: 12%
        left: 32%
        font-size: 17px
      • type: state-icon
        entity: light.salon
        title: Spots salon
        tap_action:
        action: toggle
        style: {top: 65%, left: 44%, --iron-icon-height: 42px, --iron-icon-width: 42px}
      • type: image
        entity: light.salon
        tap_action:
        action: none
        image: /local/plan2.png
        state_filter:
        “on”: brightness(100%)
        “off”: brightness(50%)
        style: {top: 0%, left: 0%, width: 0%}

Any idea why ?
I’m using Home Assistant 0.84.6.

Thank you :slight_smile:

Nevermind, I failed wih the identation of “style” in the .yaml, it’s working fine now.