Custom button card on-of color

Hello I try to make a simple custom button card, but it is never simple for me.

I wanted mine power mdi icon to change color when I turn it on when it is of it muss be red en when it is on it muss be green.

The button itself works fine mine fan goes on and of only the mdi.pwower icon doesn’t change color.

I tried a couple of configs and this mine latest.

type: custom:button-card
entity: script.plafond_ventilator_aan_uit
name: Plafond Ventilator
icon: mdi:power
tap_action:
  action: call-service
  service: script.turn_on
  service_data:
    entity_id: script.plafond_ventilator_aan_uit
styles:
  card:
    - background-color: rgba(0, 0, 0, 1)
state:
  - value: "on"
    styles:
      icon:
        - color: green
  - value: "off"
    styles:
      icon:
        - color: red
  - value: unknown
    styles:
      icon:
        - color: grey

And for the question I hope someone knows the solution.

Turn on what?
The code changes a color dependently on the “entity” which is a script.

When I turn on mine plafond ventilator
This one turns on and turns of because it is one button on the remote control.

   type: custom:button-card
aspect_ratio: 1.2/1
color: rgb(0, 255, 0)
color_type: icon
entity: remote.broadlink
name: Plafond ventilator
show_name: true
show_state: false
tap_action:
  action: call-service
  service: remote.send_command
  service_data:
    entity_id: remote.broadlink
    command: Aan - Uit
    device: Plafond ventilator
state:
  - value: "off"
    color: rgb(255, 0, 0)
    icon: mdi:power
    styles:
      card:
        - background-color: black
      icon:
        - color: rgb(255, 0, 0)
  - value: "on"
    color: rgb(0, 255, 0)
    icon: mdi:power
    styles:
      card:
        - background-color: black
      icon:
        - color: rgb(0, 255, 0)

I also have a boolean but nothing change the colors