Changing the default icon of an Entity's STATE

I am trying to modify the default icons used for a Garage door and it’s various states. If I make no modification, everything works the way I want it to, albeit not using the icons that I want. When my garage is closed, the icon mdi:garage' is displayed when it is open the icon mdi:garage-open, when it is actually opening or closing an up or a down arrow is displayed. I would like to use instead mdi: garage-variant’ when it is closed and mdi:garage-open-variant when it is open, (the arrows are fine as is for when it is moving). It is easy to change an Entity icon, but when I do, it is used for ALL states (garage closed, open, closing, opening). How do I change the default icons of the individual states?

Thx,
fj

There was some discussion in this thread.

also discussion here.