Custom:button-card Radon fan animation help

I am trying to get a spinning fan animation if my radon fan is spinning. I have a shelly PM mini sensing the wattage at the fan. I want the fan animation if the value/wattage is 50 or over. Here is a start of what I am trying to accomplish…

type: custom:button-card
entity: sensor.radon_fan_sensor_power
name: Radon fan
icon: mdi:fan
color: blue
state:
  - value: <50
    color: red
    styles:
      icon:
        - animation: null
  - value: ">50"
    color: blue
    styles:
      icon:
        - animation: rotating 2s linear infinite