Skip to content

Sub button background-color change 3 conditions (or more) #1011

Discussion options

You must be logged in to vote
.bubble-sub-button-1 { 
  background: ${hass.states['sensor.energy_meter_ac_power_ab'].state > 2000 ? '#EC1616AA'
                : hass.states['sensor.energy_meter_ac_power_ab'].state > 1000 ? '#FFD000AA' 
                : hass.states['sensor.energy_meter_ac_power_ab'].state > 1 ? '#O5CE37AA' 
                         : '#9D9D9DAA'} !important; 
}                        

If this solves your issue, please mark this as solved.

Replies: 1 comment 1 reply

Comment options

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

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