How to control a Button background color based on the state of multiple entities

I am trying to create a button on my dashboard that has a yellow background when any of several entities are in an on state, and black when none are on. I have a menu of every room in the house and each button takes you to a submenu that contains all the lights or device for that room, but I want the root menu button to light up if anything in the room is on.

Thanks