Hi all,
probably a stupid question … at least I have the feeling this should be obvious and I don’t find out how to do it.
I want to combine multiple “elements” in one card. I know there is the custom button-card but this seems overkill for such a simple thing. Isn’t there a simple solution?
To be clear on what I am looking for. This is what I have:
this what I want:
Any help appreciated.
Thanks!
Wolfgang
Replying to my own question in case somebody is looking for the same …
I solved it with custom:stack-in-card. I tried that couple days ago but it wasn’t found after installing it with HACS and I got error messages. Tried clearing cache as advised but didn’t work. Now, couple days later it works.
This is what it looks like:
custom:stack-in-card still requires some cosmetical touch ups which can be achieved with card-mod. Here the YAML:
type: custom:stack-in-card
mode: vertical
card_mod:
style: |
ha-card {
background-color: rgba(0,0,0,0.75);
}
cards:
- type: markdown
content: Main Pool Power
card_mod:
style: |
ha-card {
text-align: center;
font-size: 150%;
box-shadow: none;
border: none;
border-radius: 0;
}
- show_name: true
show_icon: true
type: entity-button
icon: mdi:power
entity: switch.direct_wire_40a_outdoor_switch_500s
tap_action:
action: call-service
service: script.drain_for_1_minute
target: {}
name: (auto 9am- 5pm)
card_mod:
style: |
ha-card {
box-shadow: none;
border: none;
border-radius: 0;
}
- type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
icon: ''
name: manual ON
entity: script.pool_power_on
card_mod:
style: |
ha-card {
box-shadow: none;
border: none;
border-radius: 0;
}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
icon: mdi:power-plug-off
name: manual OFF
entity: script.pool_power_off
card_mod:
style: |
ha-card {
box-shadow: none;
border: none;
border-radius: 0;
}
Cheers