Batteriekarte
🧩 Syntax:
type: custom:stack-in-card
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: 45% 55%
margin: '-4px -4px -8px -4px;'
cards:
- type: custom:mushroom-template-card
entity: sensor.XXX_battery_soc
primary: Batterie
secondary: '{{states(''sensor.XXX_battery_soc'') }}%'
icon: mdi:home-battery-outline
icon_color: teal
icon_type: icon
badge_icon: "{% if is_state('binary_sensor.batterie_laden','on') %}\n\_\_mdi:arrow-up-bold\n{% endif %}"
badge_color: "{% if is_state('binary_sensor.batterie_laden','on') %}\n\_\_teal\n{% endif %}"
tap_action:
action: navigate
navigation_path: solar
card_mod:
style: |
ha-card {
border: none;
}
- type: custom:bar-card
entity: sensor.XXX_battery_soc
severity:
- from: '0'
color: gray
to: '0'
- from: '1'
to: '49'
color: teal
- from: '50'
to: '100'
color: teal
name: ' '
height: 42px
min: '0'
max: '100'
entity_row: true
color: teal
positions:
icon: 'off'
indicator: 'off'
value: 'off'
card_mod:
style: |
ha-card {
padding: 12px;
margin-left: 12px;
--bar-card-border-radius: 12px;
border: none;
}
bar-card-backgroundbar {
opacity: 0.2;
filter: brightness(1);
}