Advise on custom button card

Good evening.
A dry question: it is possible to change the type of icon, in a custom button card, based on the status of a binary sensor when the custom button card is the command to turn on a light?

I tried the various examples in the github custom button card but I couldn’t find it and I couldn’t do it myself

Thanks, Alberto