How add buttons to entities card?

Where I can find code example for cards with buttons (see. above)? I have such cards in default states ui.

You can use builtin scripts

or use this custom card

With scripts i get only EXECUTE button or toggle switch? Is it possible to have two buttons or change button caption with scripts?

Check the custom card I mentioned

I use it already.
Just interesting, if I had such card in default states UI, why I cant use it?