Picture is not blinking

Hi there,
I am trying to flash a photo with the following code I found, however this is not working.
Can someone explain to me where the error could be?

  - card_type: horizontal-stack
    cards:
      - entity: sensor.ophaalkalender_vandaag
        name: Vandaag
        show_state: true
        state_image:
          Geen: /local/foto/container-geen-ophaling.jpg
          gft: /local/foto/container-grijs.jpg
          papier: /local/foto/container-blauw-geel.jpg
          pmd: /local/foto/zak-blauw.jpg
          restafval: /local/foto/zak-groen.jpg
        style: |
          ha-card {
            border-radius: 0px;
            animation: {% if is_states('sensor.ophaalkalender_vandaag') != 'Geen' %} blink 2s linear infinite;
                       {% else %} none
                       {% endif %}
          }
          @keyframes blink {
            100% {opacity: 0;}
            }    
        type: picture-entity
      - entity: sensor.ophaalkalender_morgen
        name: Morgen
        show_state: false
        state_image:
          Geen: /local/foto/container-geen-ophaling.jpg
          gft: /local/foto/container-grijs.jpg
          papier: /local/foto/container-blauw-geel.jpg
          pmd: /local/foto/zak-blauw.jpg
          restafval: /local/foto/zak-groen.jpg
        style: |
          ha-card {
            box-shadow: none;
            margin: 0px -16px 0px -16px;
            animation: {% if is_state('sensor.ophaalkalender_morgen') != 'Geen' %} blink 2s linear infinite;
                       {% else %} none
                       {% endif %}
            }
          @keyframes blink {
            100% {opacity: 0;}
            }   
        type: picture-entity
    type: 'custom:hui-element'
type: entities
type or paste code here

hi got any solution

Wrong.
Must be is_state(‘xxxxx’,‘xxxxx’)