How to extract the enity value and use it for lovelace?

Hello:
I use the picture-elements of lovelace to extract the value of the enity, and the variable gives the image to control the position


I added it like this but unfortunately it didn’t work

  - action: none
    image: /local/image/dianchi_rl2.png
    card_mod:
      style: |
        ha-card {
          color: red;
        }
    style:
      clip-path: >-
        polygon(0% 10%, 0% 100%, 100% 100%, 100%
        10%)
      left: 70.9%
      top: >-
        ${states['sensor.state'] .state + %}
      width: 26.5%
    type: image
    tap_action:
      action: none