Custom Button Card; change background based on other entity's state

Hi,

New here but spent some time searching before giving up… Here’s my idea and problem:

I want my buttom card to change color based on other entity’s state; For example, I have a switch that controls three water heaters. I’d like the button to behave normally, having the icon reflect the state of the switch. However, I’d like the card’s background the reflect the power state on another entity (grey when off, red < 150W, yellow 150-300W and green >300).

Is this possible with custom button card (or any other card)? Or do I need card-mod for this?

Thanks in advance!

You do not.
Check examples in this button-card repo or look in the main thread (which is a place where all button-card related questions should be asked imho)