Custom button card : UI for delayed button card actions

I use 4 custom buttons to set HVAC fan mode: low, medium, high and auto.
Due to the vendor implementation, it takes about 5-10 seconds before the UI state is updated.
How do I create an effect to show the user (mainly me) that I pressed the button (color X) and when the operation is done and the state is being sent from the devices it shows the state color (color Y)?

image

So when I press High for example, I’ll see a different color (e.g. Red) and when the state will changed it will go Blue.
Thanks

Thanks

did you do it?