Group background Color

Is it possible to change to background color of one specific group as shown on the image below? Basically, I would like to change the background color of a specific group depending on the state of a sensor/device (i.e UPS switched to battery, HEM report high wattage, etc). I am currently running Hassbian V0.85.1

In lovelace you can set the theme for a single card like the one you have shown, not sure if you are using lovelace or not.

However, I am not aware of a means to do this dynamically.

Personally I would setup an automation to notify me of an event like you described and pass the relevant data through the basic notification text or with a template to pull the current sensor information. I however, don’t regularly view my frontend, I rely on automations to handle things or notify me of things to take action on.