Change state icon and color

Hi!
I have a button that starts a script.
How do I change the icon and color from another entity state ?