Condition "button" color

Scenario

I have a motorhome; I like to be “visual notify (blink)” that the windows are close when the engine is running.

I got aqara sensor that are on windows, I am able to show if the window is open are close with different color, but like to add a condition to “blinks” when the motorhome is moving ( I have a sensor for that)

Any help / suggestion is apreciated

type: custom:button-card
color_type: card
icon_name_state: null
entity: lock.fordpass_doorlock
size: 10%
styles:
card:
- font-size: 10px
- font-weight: bold
name: null
state:

  • value: ‘on’
    color: yellow
    icon: mdi:door-open
  • operator: default
    color: green
    icon: mdi:door-closed

:one::one: Format it properly