Change icon entity on battery level

How can modify the icon color and/or animation when the battery level of the entity falls to specific value in card :

  - type: custom:button-card
    aspect_ratio: 1
    entity: binary_sensor.door_garage
    show_name: false
    state:
      - color: rgb(255,193,0)
        icon: mdi:door-closed
        value: 'off'
      - color: rgb(0,255,0)
        icon: mdi:door-open
        value: 'on'

I want the icon blink or change to yellow when the battery level falls to 10%

Thanks

This is a right place to ask questions related to the custom:button-card:

Clear, the question is if there is another way like mod or css

Anyway thanks

If you need to define an icon’s color (or an icon itself) dependently on some entity’s state (or any other condition) - you may definitely use custom:button-card.
Short example:

...
icon: ... place you template here ...
styles:
  icon:
    - color: ... place you template here ...