Mushrooms chips card animation state sensor

Hello everyone, I’m in trouble;
i have a sensor that detects when the phone is connected to wifi; i created a small board with mushrooms chips but i would like the chips to flash only when connected to the wifi network. you can help me?

type: custom:mushroom-chips-card

  • type: template
    entity: binary_sensor.redmikry_wifi_state
    icon: mdi:wifi
    icon_color: ‘{{ ‘‘green’’ if is_state(entity, ‘‘on’’) else ‘‘red’’ }}’
    style: |

    .content {
      animation: blink 1s linear infinite;
    @keyframes blink {
      50% {opacity: 0;}