Skip to content
Discussion options

You must be logged in to vote

Either you use one of the modules that allow this via GUI, or your code requires some if...then...else.

Here is an example how you could change the background of a sub button depending on the state of an entity:

.bubble-sub-button-1 {
  background-color: ${hass.states['media_player.sonos_wohnzimmer'].state == 'playing' ? 'rgba(255,140,0,1)' : 'white'} !important;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@prestr
Comment options

Answer selected by prestr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment