Can't get opacity/transparency to work as in 3d Floorplan card

Trying to mimick but when I make a black png to do the “darkening” and “lightning” but I have two issues.

  1. the area just says black

  2. the size of the overlayed picture is not scaled the same as the picture-element image (impact differs between safari, opera, google and firefox)

#2 I can kind of live with and add some scaling manually but would like to understand :wink:
but #1 is annoying as seen on below image:

Notice the black box in upper right - that should just be transparent.

My card setup is as follows:

  - title: Overview
    panel: true
    - type: vertical-stack
        - type: custom:plan-coordinates
        - type: picture-elements
          image: /local/floorplan/groundfloor.png
            - type: image
              entity: group.kitchen_lights
                 action: toggle
              image: /local/floorplan/dark_kitchen.png
                "off": opacity(50%) 
                "on": opacity(1%)
                left: 67%
                top: 22%

full config can be seen at

gdammit - while I was working on it someone in my house pushed the wall switch so the lights were unreachable and thus in “Unknown” state…

But the question why the image is not scaled same as the main picture-element card would be good to know.

Its actually really bad - resizing in browser and the scaling just goes haywire.

The only diff between these two pictures is my resizing the browser window:

Maybe the problem has already been resolved.
But I think the rectangle should be in vector format. Then it will scale along with the background.