problem on background #1177
Closed
Answered
by
Menelao147
platini76
asked this question in
Questions about config, custom styles and templates
-
Beta Was this translation helpful? Give feedback.
Answered by
Menelao147
Jan 23, 2025
Replies: 2 comments 1 reply
-
type: custom:bubble-card
card_type: button
button_type: switch
entity: lock.nuki_porta_fronte_bocchio
name: Porta Ingresso
card_layout: large
sub_button:
- entity: sensor.nuki_porta_fronte_bocchio_batteria
show_state: true
show_attribute: true
show_icon: true
show_background: true
state_background: true
styles: |
.bubble-button-background { background: transparent !important; }
.bubble-icon {
color: ${hass.states['lock.nuki_porta_fronte_bocchio'].state === 'locked' ? 'red' : 'green'} !important;
}
.bubble-icon-container {
background-color: ${hass.states['lock.nuki_porta_fronte_bocchio'].state === 'locked' ? 'rgba(255, 0, 0, 0.2)' : 'rgba(0, 255, 0, 0.2)'} !important;
}
.bubble-sub-button-1 > ha-icon {
color:
${hass.states['sensor.nuki_porta_fronte_bocchio_batteria'].state < 10 ? 'red' :
hass.states['sensor.nuki_porta_fronte_bocchio_batteria'].state <= 20 ? 'yellow' :
'green'} !important;
}
.bubble-sub-button-1 {
background-color: rgba(86, 86, 85, 0.6) !important;
}
${icon.setAttribute("icon",
hass.states['lock.nuki_porta_fronte_bocchio'].state === 'locked' ? 'mdi:lock'
: 'mdi:lock-open')}
show_state: true
force_icon: false
show_last_changed: false
show_attribute: false
show_name: true
show_icon: true
scrolling_effect: true |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
platini76
-
oh yessss! I see that the problem was the slider button |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this?
.bubble-button-background { background: transparent !important; }