276 lines
7.9 KiB
YAML
276 lines
7.9 KiB
YAML
# ===================================================================
|
|
# Batterie-Optimierung Dashboard - KOMPAKTE VERSION
|
|
# Mit Stack-in-Card für maximale Übersichtlichkeit
|
|
# ===================================================================
|
|
|
|
title: Batterie Compact
|
|
path: battery-compact
|
|
icon: mdi:battery-charging
|
|
badges: []
|
|
cards:
|
|
|
|
# ===================================================================
|
|
# ROW 1: HAUPTSTATUS (Volle Breite)
|
|
# ===================================================================
|
|
|
|
- type: custom:power-flow-card-plus
|
|
entities:
|
|
battery:
|
|
entity: sensor.ess0_activepower
|
|
state_of_charge: sensor.esssoc
|
|
display_state: two_way
|
|
grid:
|
|
entity: sensor.grid_activepower
|
|
solar:
|
|
entity: sensor.production_activepower
|
|
home:
|
|
entity: sensor.consumption_activepower
|
|
clickable_entities: true
|
|
display_zero_state:
|
|
transparency: 50
|
|
w_decimals: 0
|
|
kw_decimals: 2
|
|
|
|
# ===================================================================
|
|
# ROW 2: STEUERUNG & STATUS (2+2 Spalten)
|
|
# ===================================================================
|
|
|
|
- type: horizontal-stack
|
|
cards:
|
|
# LINKS: Steuerung
|
|
- type: custom:stack-in-card
|
|
mode: vertical
|
|
cards:
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
button_type: switch
|
|
entity: input_boolean.battery_optimizer_enabled
|
|
name: Auto-Optimierung
|
|
icon: mdi:robot
|
|
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
button_type: switch
|
|
entity: input_boolean.goodwe_manual_control
|
|
name: Manuell
|
|
icon: mdi:hand-back-right
|
|
|
|
- type: glance
|
|
entities:
|
|
- entity: sensor.esssoc
|
|
name: SOC
|
|
- entity: sensor.hastrom_flex_ext
|
|
name: Preis
|
|
|
|
# RECHTS: Plan-Status
|
|
- type: custom:stack-in-card
|
|
mode: vertical
|
|
cards:
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
entity: sensor.battery_charging_plan_status
|
|
name: Ladeplan
|
|
icon: mdi:calendar-clock
|
|
show_last_changed: true
|
|
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
entity: sensor.battery_next_charge_time
|
|
name: Nächste Ladung
|
|
icon: mdi:clock-start
|
|
show_state: true
|
|
|
|
- type: markdown
|
|
content: |
|
|
{% set schedule = state_attr('pyscript.battery_charging_plan', 'schedule') %}
|
|
{% set charging = schedule | selectattr('action', 'equalto', 'charge') | list if schedule else [] %}
|
|
**{{ charging | length }} Ladestunden geplant**
|
|
card_mod:
|
|
style: |
|
|
ha-card {
|
|
padding: 8px 16px !important;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
# ===================================================================
|
|
# ROW 3: PREIS-CHART (Volle Breite)
|
|
# ===================================================================
|
|
|
|
- type: custom:plotly-graph
|
|
title: 💶 Strompreis & Ladeplan (48h)
|
|
hours_to_show: 48
|
|
refresh_interval: 300
|
|
layout:
|
|
height: 250
|
|
margin:
|
|
t: 40
|
|
b: 40
|
|
l: 50
|
|
r: 20
|
|
showlegend: true
|
|
legend:
|
|
orientation: h
|
|
y: -0.2
|
|
entities:
|
|
# Strompreis-Linie
|
|
- entity: sensor.hastrom_flex_ext
|
|
name: Strompreis
|
|
line:
|
|
color: '#FF9800'
|
|
width: 2
|
|
fill: tozeroy
|
|
fillcolor: 'rgba(255, 152, 0, 0.1)'
|
|
|
|
# Geplante Ladungen als Marker
|
|
- entity: ''
|
|
internal: true
|
|
name: Geplante Ladung
|
|
mode: markers
|
|
marker:
|
|
color: '#4CAF50'
|
|
size: 14
|
|
symbol: star
|
|
line:
|
|
color: '#2E7D32'
|
|
width: 2
|
|
|
|
# ===================================================================
|
|
# ROW 4: SOC & LEISTUNG (Volle Breite)
|
|
# ===================================================================
|
|
|
|
- type: custom:plotly-graph
|
|
title: 🔋 Batterie-Übersicht (24h)
|
|
hours_to_show: 24
|
|
refresh_interval: 60
|
|
layout:
|
|
height: 250
|
|
margin:
|
|
t: 40
|
|
b: 40
|
|
l: 50
|
|
r: 50
|
|
showlegend: true
|
|
legend:
|
|
orientation: h
|
|
y: -0.2
|
|
yaxis:
|
|
title: SOC (%)
|
|
side: left
|
|
range: [0, 100]
|
|
fixedrange: true
|
|
yaxis2:
|
|
title: Leistung (W)
|
|
side: right
|
|
overlaying: y
|
|
entities:
|
|
# SOC
|
|
- entity: sensor.esssoc
|
|
name: SOC
|
|
yaxis: y
|
|
line:
|
|
color: '#2196F3'
|
|
width: 3
|
|
fill: tozeroy
|
|
fillcolor: 'rgba(33, 150, 243, 0.15)'
|
|
|
|
# Batterie-Leistung
|
|
- entity: sensor.ess0_activepower
|
|
name: Leistung
|
|
yaxis: y2
|
|
line:
|
|
color: '#4CAF50'
|
|
width: 2
|
|
|
|
# ===================================================================
|
|
# ROW 5: KOMPAKTER PLAN (Ausklappbar)
|
|
# ===================================================================
|
|
|
|
- type: custom:bubble-card
|
|
card_type: separator
|
|
name: Detaillierter Plan
|
|
icon: mdi:format-list-bulleted
|
|
|
|
- type: custom:stack-in-card
|
|
mode: vertical
|
|
cards:
|
|
# Statistiken kompakt
|
|
- type: horizontal-stack
|
|
cards:
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
entity: ''
|
|
name: |
|
|
{{ state_attr('pyscript.battery_charging_plan', 'plan_statistics').total_charging_hours or 0 }}h
|
|
sub_button:
|
|
- name: Ladedauer
|
|
icon: mdi:timer
|
|
show_background: false
|
|
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
entity: ''
|
|
name: |
|
|
{{ state_attr('pyscript.battery_charging_plan', 'plan_statistics').total_energy_kwh | round(1) or 0 }}kWh
|
|
sub_button:
|
|
- name: Energie
|
|
icon: mdi:lightning-bolt
|
|
show_background: false
|
|
|
|
- type: custom:bubble-card
|
|
card_type: button
|
|
entity: ''
|
|
name: |
|
|
{{ state_attr('pyscript.battery_charging_plan', 'plan_statistics').average_price | round(2) or 0 }}ct
|
|
sub_button:
|
|
- name: Ø Preis
|
|
icon: mdi:currency-eur
|
|
show_background: false
|
|
|
|
# Plan-Tabelle
|
|
- type: markdown
|
|
content: |
|
|
{% set schedule = state_attr('pyscript.battery_charging_plan', 'schedule') %}
|
|
{% if schedule %}
|
|
{% for slot in schedule %}
|
|
{% if slot.action == 'charge' %}
|
|
**{{ slot.time[5:16] }}** · {{ slot.power }}W · {{ slot.price }}ct/kWh
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
⚠️ Kein Plan verfügbar
|
|
{% endif %}
|
|
card_mod:
|
|
style: |
|
|
ha-card {
|
|
padding: 12px;
|
|
font-size: 0.95em;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
# ===================================================================
|
|
# ROW 6: PARAMETER (Optional ausklappbar)
|
|
# ===================================================================
|
|
|
|
- type: custom:bubble-card
|
|
card_type: separator
|
|
name: Einstellungen
|
|
icon: mdi:cog
|
|
|
|
- type: entities
|
|
entities:
|
|
- entity: input_number.battery_optimizer_min_soc
|
|
name: Min. SOC (%)
|
|
- entity: input_number.battery_optimizer_max_soc
|
|
name: Max. SOC (%)
|
|
- entity: input_number.battery_optimizer_max_charge_power
|
|
name: Ladeleistung (W)
|
|
- entity: input_number.battery_optimizer_reserve_capacity
|
|
name: Reserve (kWh)
|
|
- entity: input_number.battery_optimizer_price_threshold
|
|
name: Preis-Schwelle (ct/kWh)
|
|
card_mod:
|
|
style: |
|
|
ha-card {
|
|
margin-top: 0px;
|
|
}
|