Picture-elements - can only toggle first element in the list?

Hi guys, I’m trying out a floorplan with picture-elements for the first time after having installed HA last week.

I appear to have everything working on my floorplan and can correctly initiate the toggling of a Hue bulb by clicking on the image accordingly, but when I try and add another both bulbs don’t respond.

I have a left_bulb and right_bulb; if I place just the left in the code, it works. If I place just the right in the code, it works. If I have both, and left is first, left will work; if I have both, and right is first, right will work.

I’m using the below code - could someone advise where I’m going wrong please? (Forgive the poor formatting/lack of indentations - this didn’t seem to copy/paste across too well).

views:
- panel: true
title: Floor Plan
icon: 'mdi:floor-plan'
cards:
- type: picture-elements
image: /local/on.png
elements:

- type: image
entity: light.left_light
tap_action: none
hold_action: none
state_image:
'on': /local/transparent_square.png
'off': /local/right_light off.png
style:
top: 50%
left: 50%
width: 100%

- type: image
entity: light.left_light
tap_action:
action: toggle
image: /local/transparent_square.png
style:
top: 30%
left: 54.5%
border: 5px solid red

- type: image
entity: light.right_light
tap_action: none
hold_action: none
state_image:
'on': /local/transparent_square.png
'off': /local/left_light off.png
style:
top: 50%
left: 50%
width: 100%

- type: image
entity: light.right_light
tap_action:
action: toggle
image: /local/transparent_square.png
style:
top: 41%
left: 61.5%
width: 50px
height: 50px
border: 5px solid blue

If this is the actual config, it is no wonder it does not work.
Spaces are quite important in yaml.
Please post the config exactly as it is written, including all leading spaces on each line.

Thanks, but as stated above the YAML is valid - it was just a bad copy/paste which lost the indentations (and I couldn’t figure out how to make the formatting persist in the paste without writing it out manually).

I figured out the issue, which is the ordering of “- type” blocks is important:

In the example above I have…

100% image
50px by 50px image (which works)
100% image
50px by 50px image (which doesn’t work)

…reordering these as follows resolved the problem…

100% image
100% image
50px by 50px image
50px by 50px image