Hi,
I’m trying to change the colour of an icon in a bubble card the with below code and it doesn’t seem to change anything. Does anyone know why?
type: custom:bubble-card
card_type: button
name: Fan Living Room
icon: mdi:fan
show_state: false
entity: switch.living_room_4gang_l4
styles: |-
.bubble-icon {
color: ${hass.states['switch.living_room_4gang_l4'].state === 'off' ? 'blue' : ''}; /* Set color to blue when the switch is off */
animation: ${hass.states['switch.living_room_4gang_l4'].state === 'on' ? 'slow-rotate 3s linear infinite' : ''};
}
@keyframes slow-rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
|
.bubble-button-card-container {
background: rgba(245, 40, 145, 0.8) !important;
}