Hide icons on state (masonry-layout)

Hi everyone,

I am tryiing to hide my occupancy icons on my masonry-layout if the occupancy is off.
I have found some hints, but none of these seem to work.
This is my code snippet:

type: custom:layout-card
layout_type: custom:masonry-layout
cards:
  - type: picture-elements
    elements:
      - type: icon
        entity: input_boolean.flur_og_occupancy
        icon: mdi:walk
        state:
          - value: 'off'
            color: green
          - value: 'on'
            color: red

This for instance is just showing the black icon.

any hint would be greatly appreciated

Does no one have a hint for me?