Can't toggle a light in 3D plan

Bonjour !

I have trouble to make my light switch working in my Lovelace 3D plan.

What is working:

  • 3D plan
  • light button (state icon) is visible (on 3D plan)
  • mask change when light is on or off

What is not working:

  • can’t turn on/off the light when pressing on button in 3D plan.

I’m a bit lost. Is everyone could help me please ?

Here is my configuration:

title: Maison
views:
  - panel: true
    title: Plan 3D
    path: plan-3d
    badges: []
    cards:
      - type: picture-elements
        image: local/images/plan3D/plan_dark.png
        elements:
          - type: image
            entity: light.chambre
            style:
              top: 50%
              left: 50%
              width: 100%
            state_image:
              'on': /local/images/plan3D/chambre on.png
              'off': /local/images/plan3D/transparent.png
          - type: state-icon
            entity: light.chambre
            tap-action:
              action: toggle
            style:
              top: 50%
              left: 65%
              width: 100%

I think I’ve got it. That was a layer problem. The bulb was not accessible because it was “hidden” by transparent layer.

I moved the code to the end…and voila !

But I still have another problem. When I press the buld, it doesn’t turn on/off but a new panel appears. (see below). How could I make this work directly ?


Tks