Trying to display motion sensors in floor plan

Following my SATEL ALARM integration in HA, i am now trying to show indication of motion sensor state in a floor plan like this:

 - type: state-icon
    entity: sensor.integra_pir_grafio
    icon: mdi:run
    style:
      top: 40%
      left: 74%
      value_template: '{{ ''VIOLATED'' in states(''sensor.integra_pir_grafio'') | default([]) }}'
      action:
      '--iron-icon-stroke-color': '#8c1414'
      border-radius: 50%
      text-align: center
      background-color: rgba(255, 255, 255, 0.3)

So the icon should change color when sensor (zone) state turns to ‘violated’ but… its doesn’t work.
What am I doing wrong?

Is that CSS?
Inspire yourself from this topic

Technically this “floorplan” sub-category is for the ha-floorplan custom component. No biggie but picture elements discussions should be over in configuration-frontend.

Apologies!
Is there anyway to transfer this thread to the other section?

You could maybe flag your post and see if a mod can move it

Hi John, did you managecto solve this? I am trying to do the same. Thank you

If you are using ha-floorplan then post your query with more detail. If you are using picture elements then try the other forum