I’m hoping someone here can help. I am using stack-in-card to combine 2 cards vertically: (Entities card & Bar-card) . However, its not completly seamless. There’s a divider between the 2 cards.
Note: bar-card entities in the below screenshot are currently hidden. I configured bar-card to hide entities that are 0.0 in value:
Screenshot:
Could someone PLEASE help me with the magic card-mod code that will hide that separator?
Test with a DEFAULT LIGHT theme (and attach a corresp. screenshot). People may not have your eyes (& time) to find out what is displayed here.
SIMPLIFY the case as more as possible. Here - do not hide bars, test with ONE unhidden bar. It will save you explanations & simplify understanding for people.
Hi there,
Can anybody please help me create an input selection card with buttons instead of the standard dropdown?
I’m in the following stage and would like the three buttons’ width to fill the entire width of the card. Distributed evenly and centered buttons’ content.
…
That works, thanks a lot @Roderik! Would be nice to have it done in a way so it automatically determines the right width as a certain width % value that works well on one device doesn’t work on another but I can live without that.
Played around a little longer.
If you set the width to 100% and add “flex-wrap: nowrap;” to the div.chip-container it should automatically scale for you.
Can you check if this works?
type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Notify Michal when Away
icon: mdi:message-badge
entity: input_select.doorbell_notification_away_michal
icon_color: blue
- type: custom:mushroom-chips-card
chips:
- type: template
entity: input_select.doorbell_notification_away_michal
tap_action:
action: call-service
service: input_select.select_option
data:
option: Today
target:
entity_id: input_select.doorbell_notification_away_michal
icon: null
content: Today
card_mod:
style: |
ha-card {
justify-content: center;
{% if is_state('input_select.doorbell_notification_away_michal', 'Today') %}
--chip-background: rgba(var(--rgb-blue), 0.7);
{% else %}
--chip-background: inherit; # set it to the default or whatever color you want
{% endif %}
}
- type: template
entity: input_select.doorbell_notification_away_michal
tap_action:
action: call-service
service: input_select.select_option
data:
option: 'On'
target:
entity_id: input_select.doorbell_notification_away_michal
icon: null
content: 'On'
card_mod:
style: |
ha-card {
justify-content: center;
{% if is_state('input_select.doorbell_notification_away_michal', 'On') %}
--chip-background: rgba(var(--rgb-blue), 0.7);
{% else %}
--chip-background: inherit; # set it to the default or whatever color you want
{% endif %}
}
- type: template
entity: input_select.doorbell_notification_away_michal
tap_action:
action: call-service
service: input_select.select_option
data:
option: 'Off'
target:
entity_id: input_select.doorbell_notification_away_michal
icon: null
content: 'Off'
card_mod:
style: |
ha-card {
justify-content: center;
{% if is_state('input_select.doorbell_notification_away_michal', 'Off') %}
--chip-background: rgba(var(--rgb-blue), 0.7);
{% else %}
--chip-background: inherit; # set it to the default or whatever color you want
{% endif %}
}
alignment: Center
card_mod:
style: |
mushroom-template-chip {
width: 100%;
}
div.chip-container {
justify-content: space-evenly;
flex-wrap: nowrap;
}
ha-card {
margin: 0px 12px 12px;
--chip-background: rgba(var(--rgb-disabled), 0.15);
--chip-box-shadow: none;
--chip-border-radius: 10px;
--chip-height: 42px;
--chip-padding:10px;
}
The following card_mod code should turn “ Low Batteries!” to blue and it will turn the titles of each sub card to green. Hopefully you can use it to get the desired effect (wasn’t sure what title you wanted changed, the top one, or the individual ones).
Hi @Ildar_Gabdullin thank you. I was able to get rid of the separator by using the updated version of Stack-in-card. However, now there’s a big empty space when the bottom card doesn’t have any items visible. How do I use card-mod to remove that extra space at the bottom?
Below, is what my current code looks like:
type: custom:stack-in-card
mode: vertical
cards:
- type: entities
title: iGPU
entities:
- entity: sensor.cpu_gt_core_temperature
name: Core Temperature
- entity: sensor.gpu_d3d_memory_dynamic_memory
name: Dynamic RAM
- type: custom:bar-card
severity:
- from: '0'
to: '0'
hide: true
- from: '1'
to: '40'
color: '#007A00'
- from: '41'
to: '90'
color: '#EA9000'
- from: '91'
to: '100'
color: '#C41400'
entities:
- entity: sensor.gpu_d3d_usage
name: iGPU Usage
- entity: sensor.gpu_video_decode_0_usage
name: Video Decoder 0
- entity: sensor.gpu_video_decode_1_usage
name: Video Decoder 1
- entity: sensor.gpu_video_processing_0_usage
name: Video Encoder 0
- entity: sensor.gpu_video_processing_1_usage
name: Video Encoder 1
hello, trying to reduce the size of the header image of the plant-card. was able to get it to work on my browser, but any change to the image does not go through on lenovo smart display which just displays the dashboard via a webpage. inspecting the element of the lenovo display using chrome shows that the size isnt changing. any suggestion on how to fix this?
I am trying to change stack-in-card’s header “padding-bottom” to 0px globally to all my stack-in-card’s via my theme.yaml.
The only way I can change the CSS style is via a single stack-in-card via Developer Tools (in the screenshot example below). I’ve already spent hours on this trying to figure this out on my own without any luck. I am hoping someone will be able to help; as I’ve tried everything I possibly could.