How to set up layers for different floorplans

Seems to miss something here.
Tried to implement this into the svg-file, but now it won`t load in the UI:

   inkscape:connector-curvature="0"
   d="m 317.56125,1070.458 c 8.05414,0 14.58266,6.1591 14.58266,12.1873 v 81.3821 c 13.67682,5.0409 23.09135,15.5725 23.09135,27.7549 0,17.0804 -18.4985,30.9257 -41.31969,30.9257 -22.82119,0 -41.31969,-13.8453 -41.31969,-30.9257 0,-12.1824 9.41453,-22.714 23.09136,-27.7549 v -81.3821 c 0,-6.0282 6.5285,-12.1873 14.58267,-12.1873 h 7.29134 m 0,-9.0968 h -7.29134 c -14.2426,0 -26.73702,9.9438 -26.73702,21.2818 v 76.1938 c -14.41105,7.4056 -23.09136,19.5689 -23.09136,32.9455 0,22.0691 23.98767,40.0226 53.47404,40.0226 29.48637,0 53.47404,-17.9535 53.47404,-40.0226 0,-13.3766 -8.68031,-25.5399 -23.09134,-32.9455 v -76.1915 c 0,-11.338 -12.49445,-21.2841 -26.73702,-21.2841 z m 18.53983,130.6423 c 0,-6.3732 -4.75814,-12.0896 -12.41817,-14.9134 l -9.76734,-3.5993 -9.76734,3.5993 c -7.66004,2.8238 -12.42134,8.5378 -12.42134,14.9134 0,9.1564 9.95169,16.6047 22.1855,16.6047 12.23382,0 22.18869,-7.4483 22.18869,-16.6047 z m 6.42044,-46.3076 c 0,-1.3133 -1.42078,-2.379 -3.17843,-2.379 h -12.71376 c -1.75768,0 -3.17844,1.0657 -3.17844,2.379 0,1.3129 1.42076,2.3788 3.17844,2.3788 h 12.71376 c 1.75765,0 3.17843,-1.0659 3.17843,-2.3788 z m 0,-18.194 c 0,-1.3132 -1.42078,-2.3789 -3.17843,-2.3789 h -12.71376 c -1.75768,0 -3.17844,1.0657 -3.17844,2.3789 0,1.3132 1.42076,2.3788 3.17844,2.3788 h 12.71376 c 1.75765,0 3.17843,-1.0633 3.17843,-2.3788 z m 0,-18.1915 c 0,-1.3132 -1.42078,-2.379 -3.17843,-2.379 h -12.71376 c -1.75768,0 -3.17844,1.0658 -3.17844,2.379 0,1.3132 1.42076,2.3789 3.17844,2.3789 h 12.71376 c 1.75765,0 3.17843,-1.0657 3.17843,-2.3789 z m 0,-18.1939 c 0,-1.3133 -1.42078,-2.3789 -3.17843,-2.3789 h -12.71376 c -1.75768,0 -3.17844,1.0656 -3.17844,2.3789 0,1.3132 1.42076,2.3789 3.17844,2.3789 h 12.71376 c 1.75765,0 3.17843,-1.0657 3.17843,-2.3789 z m -23.8383,84.0134 v -57.0937 c 0,-1.9721 -2.13271,-3.5682 -4.76765,-3.5682 -2.63492,0 -4.76765,1.5961 -4.76765,3.5682 v 57.0937 c 0,1.9697 2.13273,3.5684 4.76765,3.5684 2.63494,0 4.76765,-1.5987 4.76765,-3.5684 z"
   id="hhhgg"
   style="fill:#ffffff;fill-opacity:1;stroke-width:2.74976397"
   inkscape:label="#path2" /><rect
   style="display:inline;opacity:0;fill:#0000ff;fill-rule:evenodd"
   id="button_lights_layer"
   width="248.58289"
   height="207.1524"
   x="15.934801"
   y="1046.1938"
   inkscape:label="#button_lights_layer"
   onclick="case 'select':
          for (let otherElement of action.data.elements) {
            let otherSvgElement = $(svg).find(`[id="${otherElement.id}"]`);
            let otherSvgElementclass = otherElement.class;

            $(otherSvgElement).removeClass().addClass(otherSvgElementclass);
          }
        break;">
  <title
     id="title395">button_lights_layer</title>
</rect><
   style="opacity:0;fill:#0000ff;fill-rule:evenodd"
   id="button_hue_layer"
   width="258.14377"
   height="248.58289"
   x="3.1869602"
   y="1224.6637"
   inkscape:label="#rect3765" /><rect
   style="opacity:0;fill:#0000ff;fill-rule:evenodd"
   id="button_temp_layer"
   width="172.09584"
   height="232.64809"
   x="254.95682"
   y="1020.6982"
   inkscape:label="#rect3769" /></g></svg>

Thoght it was supposed to go into the html file under onElementClick(e function.

But what am I doing wrong if you got it to work?