Conditionally displayed widgets

I’m building a media controller view, but need to have certain controls only displayed in certain states. Would be amazing to have the ability to display entire widgets, or just the action icons on a room, dependant on the state of certain entity attributes.