Toggling Tuya switch does not affect on floor plan

Hi everyone,
I’m using Hassio v5.10 and I have created my floor plan with some pictures elements in it.
I have connected one of the images to one of my Tuya switches (contain natural wire) and I configured the brightness as:
‘on’: brightness(120%)
‘off’: brightness(100%)
When I click on the image from the floor plan the state of the switch and the brightness are changing as expected.
The issue is that when I toggle the switch itself it doesn’t reflect on the image in the floorplan.
Can someone help please?

- title: Floor plan
    icon: 'mdi:home-circle-outline'
    panel: true
    cards:
      - type: picture-elements
        image: /local/Lior_final_Plan.png
        elements:
          - type: image
            entity: switch.parentsroom
            tap_action:
              action: toggle
            image: /local/ParentsRoom.png
            state_filter:
              'on': brightness(150%)
              'off': brightness(100%)
            style:
              top: 39.7%
              left: 42.2%
              width: 10%

Check your indenting for the 3 lines below below “type: image”

Thanks Jonah.
It just a copy past issue (the indentation is ok but the issue still exists) .
The code is as follow:

- title: Floor plan
    icon: 'mdi:home-circle-outline'
    panel: true
    cards:
      - type: picture-elements
        image: /local/Lior_final_Plan.png
        elements:    
          - type: image
            entity: switch.parentsroom
            tap_action:
              action: toggle
            image: /local/ParentsRoom.png
            state_filter:
              'on': brightness(120%)
              'off': brightness(100%)
            style:
              top: 39.7%
              left: 42.2%
              width: 10%

I pasted your code into a manual card as follows, modified the switch and file references to match what I had and it worked fine.

type: picture-elements
image: /local/H115.svg
elements:
  - type: image
    entity: switch.bathroom_radiator
    tap_action:
      action: toggle
    image: /local/bmw.jpg
    state_filter:
      'on': brightness(120%)
      'off': brightness(100%)
    style:
      top: 39.7%
      left: 42.2%
      width: 10%