Changing Tracker Device Picture on Status Change

I am tracking devices that show Home or Away when we are, well, Home or Away.
In the old interface the badges show up with our pictures and say home or away.

In getting ready to upgrade I’d like to bring this over to Lovelace and add a bit of eye candy.

Instead of just showing our images and saying Home or Away which I have working with Glace cards. I would like to have the image be in colour when we are home and then grey scale when we are away.

I have a picture-entity card that seems to do the image swap but I can’t seem to shrink it down to 100x100 pixels.

Thanks!