Picture-elements change icon no longer working?

I am trying to build a floor plan using picture elements, but I don’t seem able to change the default icons used.
The problem is if I use a group.xx instead of light.xx I get a picture that looks a bit like a plug socket.

If I change it to a single light I get the bulb icon. I want to use mdi:ceiling-light instead, but it just wont change the image. I have even tried an mdi icon I know works in HA (mdi:home and mdi:home-assistant)

Am I missing something obvious or can’t you change the icons used in picture elements mode?
I have tried putting the icon under style as well.

elements:
  - type: state-icon
    icon: 'mdi:ceiling-light'
    entity: light.livingroommaster
    tap_action:
      action: toggle
    style:
      top: 47%
      left: 78%

I set the icons in customize.yaml:

light.schreibtischlampe:
  icon: mdi:desk-lamp
light.stehlampe:
  icon: mdi:floor-lamp
light.kuchendeckenlampe:
  icon: mdi:ceiling-light
light.kuchenwandlampe:
  icon: mdi:track-light

and it works nicely:

image

1 Like

Thanks, I knew it would be an easy one.

Hi! How do you do to have an open door in red color? And I guess when it is closed you also change icon to door closed?

  - type: state-icon
    entity: binary_sensor.door_window_sensor_1234567890
    style:
      top: 33%
      left: 65%
      '--paper-item-icon-color': green
      '--paper-item-icon-active-color': red
2 Likes

perfect thank you

this don’t work for me :

    entity: group.auto_volet_bureau
    icon: 'mdi:home'
    tap_action:
      action: toggle
    style:
      left: 35%
      top: 5%
      transform: scale(1.5)
      color: lightgrey
      '--paper-item-icon-color': lightgreen
      '--paper-item-icon-active-color': red

is it because of the group entities ?
also the entities are automations is that a problem ?
what can i do ?
thanks for your help