Can button that reflects an input_select entity change color based on status?

Hello all.

I want to create a button for a custom input_select entity, which it actually has two states, “locked” and “unlocked”).

Ideally I want this button to change color from off to on, when the entity goes from “unlocked” to “locked”.

Is it possible to do it or should I use a custom button instead?

How about a template switch for it

I personally would use a custom button for this as it’s probably way easier and quicker

I was wishing that this could be done with the default button card.
But custom will do too.
Thank you for your hints!