# =================================================================== # Batterie-Optimierung Dashboard - SECTIONS LAYOUT (KOMPAKT) # Modernes Home Assistant Sections-Layout mit max. 4 Spalten # =================================================================== type: sections max_columns: 4 title: Batterie Optimierung path: battery-optimizer icon: mdi:battery-charging sections: # =================================================================== # SECTION 1: HAUPTSTATUS & STEUERUNG # =================================================================== - type: grid cards: - type: heading heading: Status & Steuerung icon: mdi:view-dashboard # Power Flow Visualisierung - 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 # Steuerung & Quick-Status - type: grid cards: - type: custom:bubble-card card_type: button button_type: switch entity: input_boolean.battery_optimizer_enabled name: Auto-Optimierung icon: mdi:robot show_state: true - type: custom:bubble-card card_type: button button_type: switch entity: input_boolean.goodwe_manual_control name: Manuelle Steuerung icon: mdi:hand-back-right show_state: true - type: custom:bubble-card card_type: button entity: sensor.esssoc name: Batterie SOC icon: mdi:battery show_state: true - type: custom:bubble-card card_type: button entity: sensor.hastrom_flex_ext name: Strompreis icon: mdi:currency-eur show_state: true # =================================================================== # SECTION 2: LADEPLAN-ÜBERSICHT # =================================================================== - type: grid cards: - type: heading heading: Ladeplanung icon: mdi:calendar-clock - type: custom:bubble-card card_type: button entity: sensor.battery_charging_plan_status name: Plan-Status icon: mdi:calendar-check show_state: true 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 # Kompakte Plan-Anzeige - type: markdown content: | {% set schedule = state_attr('pyscript.battery_charging_plan', 'schedule') %} {% set stats = state_attr('pyscript.battery_charging_plan', 'plan_statistics') %} {% if schedule and stats %} **📊 Plan-Übersicht:** • {{ stats.total_charging_hours }}h Ladung geplant • {{ stats.total_energy_kwh | round(1) }} kWh Energie • Ø {{ stats.average_price | round(2) }} ct/kWh **📅 Nächste Ladungen:** {% for slot in schedule %} {% if slot.action == 'charge' %} • **{{ slot.time[11:16] }}** Uhr - {{ slot.power }}W ({{ slot.price }}ct/kWh) {% endif %} {% endfor %} {% else %} ⚠️ Kein Plan verfügbar {% endif %} # =================================================================== # SECTION 3: STROMPREIS-VISUALISIERUNG # =================================================================== - type: grid cards: - type: heading heading: Strompreis & Planung icon: mdi:chart-line - type: custom:plotly-graph title: Strompreis 48h mit Ladeplan hours_to_show: 48 refresh_interval: 300 layout: height: 280 showlegend: true legend: orientation: h y: -0.15 margin: t: 10 b: 40 l: 50 r: 20 xaxis: title: '' yaxis: title: ct/kWh entities: # Strompreis-Linie - entity: sensor.hastrom_flex_ext name: Strompreis line: color: '#FF9800' width: 2 fill: tozeroy fillcolor: 'rgba(255, 152, 0, 0.15)' # Geplante Ladungen als Marker - entity: '' internal: true name: Geplante Ladung mode: markers marker: color: '#4CAF50' size: 14 symbol: star line: color: '#2E7D32' width: 2 # =================================================================== # SECTION 4: BATTERIE-ÜBERSICHT # =================================================================== - type: grid cards: - type: heading heading: Batterie-Verlauf icon: mdi:battery-charging - type: custom:plotly-graph title: SOC & Leistung 24h hours_to_show: 24 refresh_interval: 60 layout: height: 280 showlegend: true legend: orientation: h y: -0.15 margin: t: 10 b: 40 l: 50 r: 50 yaxis: title: SOC (%) side: left range: [0, 100] 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 # =================================================================== # SECTION 5: DETAILLIERTER PLAN # =================================================================== - type: grid cards: - type: heading heading: Detaillierter Plan icon: mdi:format-list-bulleted # Plan-Statistiken als Bubble Cards - 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 # Vollständige Plan-Tabelle - type: markdown content: | {% set schedule = state_attr('pyscript.battery_charging_plan', 'schedule') %} {% set stats = state_attr('pyscript.battery_charging_plan', 'plan_statistics') %} {% if schedule and stats %} | Zeit | Aktion | Leistung | Preis | Grund | |------|--------|----------|-------|-------| {% for slot in schedule %} | {{ slot.time[11:16] }} | {{ '🔋 Laden' if slot.action == 'charge' else '⏸️ Warten' }} | {{ slot.power if slot.power else '-' }}W | {{ slot.price }}ct | {{ slot.reason }} | {% endfor %} {% else %} ⚠️ **Kein Ladeplan verfügbar** Der Plan wird täglich um 14:05 Uhr neu berechnet. {% endif %} # =================================================================== # SECTION 6: PARAMETER & EINSTELLUNGEN # =================================================================== - type: grid cards: - type: heading heading: Einstellungen icon: mdi:cog - type: entities entities: - entity: input_number.battery_optimizer_min_soc name: Minimaler SOC - entity: input_number.battery_optimizer_max_soc name: Maximaler SOC - entity: input_number.battery_optimizer_max_charge_power name: Ladeleistung - entity: input_number.battery_optimizer_reserve_capacity name: Reserve-Kapazität - entity: input_number.battery_optimizer_price_threshold name: Preis-Schwelle # =================================================================== # SECTION 7: SYSTEM-STATUS # =================================================================== - type: grid cards: - type: heading heading: System icon: mdi:information - type: glance entities: - entity: sensor.openems_state name: OpenEMS - entity: sensor.battery_capacity name: Kapazität - entity: sensor.forecast_solar_energy_today name: PV Heute - entity: sensor.forecast_solar_energy_tomorrow name: PV Morgen - type: glance entities: - entity: automation.battery_charging_schedule_calculation name: Tägliche Berechnung - entity: automation.battery_charging_schedule_execution name: Stündliche Ausführung