Button card mod question -- animate button upon scene activation

Digging into the fantastic button card mod – another bloody rabbit hole

One question: Is there any way to trigger a CSS animation when calling a service? Specifically, a scene?

I have some subtle animations working wonderfully for lights, since the animation is linked to the light’s “on” and “off” state (this does unfortunately mean all the animations trigger when the page loads/is refreshed – I’ve seen solutions out there, but haven’t really been able to parse the code).

For the scene service call however, there isn’t any one state to trigger the animation. Still, I’m convinced there is a way to do this. . Anyone manage to tackle this?

Justin