Sensors grey in picture-elements card

So, I’m trying to have a picture change, depending on the state of a binary sensor…

this is the Lovelace configuration (without the rest of the card, because it would be too much - and everything else works fine):

type: picture-elements
image: /local/background.png
name: Name
elements:
  - type: image
    entity: sensor.binary-sensor_01
    image: /local/picture_on.png
    style:
      top: 35%
      left: 69%
      width: 11%
    state_image:
      'off': /local/picture_off.png

if I use a switch as the entity, it works just fine - if the device is on, it shows picture_on.png, if it’s off, it shows picture_off.png

however, if I use a sensor as the entity its just grey and always shows picture_on.png, no matter what state it actually is - if I change state_image: 'off': to ‘unavailable’, it shows picture_off.png - even though the sensor is on

what am I doing wrong?!

Maybe you can try to move from type: image to type: picture-entity. On my configuration it works better with picture-entity.

that’s not a valid configuration - I can’t put a picture_entity in a picture_elements card - at least it just shows a red error instead of the picture :confused:

btw: I edited the post, so it’s probably clearer what I want to do