Files
battery-charging-optimizer/openems/legacy/v3/battery_optimizer_dashboard_minimal.yaml
felix.zoesch 0fa03a566a feat: Major update - Battery Optimizer v3.4.0 with comprehensive fixes
## 🎯 Hauptänderungen

### Version 3.4.0 - SOC-Drift & Charging Capacity
-  Sicherheitspuffer (20-50% konfigurierbar) für untertägige SOC-Schwankungen
-  Monatliche automatische Batterie-Kalibrierung
- 🐛 SOC-Plausibilitäts-Check (filtert 65535% Spikes beim Modus-Wechsel)
- 🐛 Zeitabhängige API-Abfrage (vor/nach 14:00 Uhr)

### Neue Features
- 🔋 **Safety Buffer**: Kompensiert SOC-Drift und Eigenverbrauch
- 🔋 **Auto-Calibration**: Monatlicher Vollzyklus für SOC-Genauigkeit
- 🔋 **Spike Protection**: 4-fach Schutz gegen ungültige SOC-Werte
- 🔋 **Smart API**: Verhindert HTTP 500 Errors bei fehlenden Tomorrow-Preisen

### Dokumentation
- 📚 SOC_CALIBRATION_GUIDE.md - Umfassender Kalibrierungs-Guide
- 📚 FIX_CHARGING_CAPACITY.md - Sicherheitspuffer-Dokumentation
- 📚 FIX_SOC_SPIKE_PROBLEM.md - Spike-Protection-Lösung
- 📚 FIX_API_TIMING.md - Zeitabhängige API-Abfrage
- 📚 DIAGNOSE_LADE_PROBLEM.md - Debug-Guide

### Neue Dateien
- battery_calibration_automation.yaml - 4 Automations für Kalibrierung
- battery_calibration_input_helper.yaml - Input Helper Config
- battery_optimizer_input_helper_safety_buffer.yaml - Puffer Config
- debug_schedule.py - Umfassendes Debug-Script

### Scripts
- battery_charging_optimizer.py v3.4.0
- hastrom_flex_extended.py v1.1.0
- debug_schedule.py v1.0.0

### Fixes
- 🐛 SOC springt auf 65535% beim ESS-Modus-Wechsel → Debounce + Plausibilitäts-Check
- 🐛 API-HTTP-500 vor 14:00 → Zeitabhängige Abfrage
- 🐛 Batterie nicht bis 100% geladen → Sicherheitspuffer
- 🐛 SOC driftet ohne Vollzyklen → Automatische Kalibrierung

## 🚀 Installation

1. Input Helper erstellen (siehe battery_optimizer_input_helper_safety_buffer.yaml)
2. Automations installieren (siehe battery_calibration_automation.yaml)
3. Scripts aktualisieren (battery_charging_optimizer.py v3.4.0)
4. PyScript neu laden

## 📊 Verbesserungen

- Präzisere Ladeplanung durch Sicherheitspuffer
- Robustheit gegen SOC-Drift
- Keine API-Fehler mehr vor 14:00
- Hardware-Stopp bei 100% wird respektiert
- Bessere Batterie-Gesundheit durch regelmäßige Kalibrierung

🤖 Generated with Claude Code (claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 08:04:07 +01:00

215 lines
5.9 KiB
YAML

# ===================================================================
# Batterie-Optimierung Dashboard - MINIMAL VERSION
# Nur das Wichtigste, maximale Klarheit
# ===================================================================
title: Batterie Minimal
path: battery-minimal
icon: mdi:battery-lightning
badges: []
cards:
# ===================================================================
# QUICK STATUS BAR
# ===================================================================
- type: horizontal-stack
cards:
- type: custom:bubble-card
card_type: button
entity: sensor.esssoc
name: Batterie
icon: mdi:battery
show_state: true
show_attribute: false
- type: custom:bubble-card
card_type: button
entity: sensor.hastrom_flex_ext
name: Strompreis
icon: mdi:currency-eur
show_state: true
- type: custom:bubble-card
card_type: button
entity: sensor.production_activepower
name: PV Aktuell
icon: mdi:solar-power
show_state: true
# ===================================================================
# STEUERUNG
# ===================================================================
- type: horizontal-stack
cards:
- type: custom:bubble-card
card_type: button
button_type: switch
entity: input_boolean.battery_optimizer_enabled
name: Auto
icon: mdi:robot
show_state: true
- type: custom:bubble-card
card_type: button
button_type: switch
entity: input_boolean.goodwe_manual_control
name: Manuell
icon: mdi:hand-back-right
show_state: true
# ===================================================================
# ENERGY FLOW
# ===================================================================
- type: custom:power-flow-card-plus
entities:
battery:
entity: sensor.ess0_activepower
state_of_charge: sensor.esssoc
grid:
entity: sensor.grid_activepower
solar:
entity: sensor.production_activepower
home:
entity: sensor.consumption_activepower
w_decimals: 0
kw_decimals: 1
min_flow_rate: 0.5
max_flow_rate: 6
# ===================================================================
# NÄCHSTE LADUNG
# ===================================================================
- type: markdown
title: 📅 Geplante Ladungen
content: |
{% set schedule = state_attr('pyscript.battery_charging_plan', 'schedule') %}
{% if schedule %}
{% set charging_slots = schedule | selectattr('action', 'equalto', 'charge') | list %}
{% if charging_slots | length > 0 %}
{% for slot in charging_slots[:5] %}
### {{ '🟢 JETZT' if loop.index == 1 and slot.time[:13] == now().strftime('%Y-%m-%d %H') else '⏰' }} {{ slot.time[11:16] }} Uhr
**{{ slot.power }}W** bei **{{ slot.price }}ct/kWh**
{{ slot.reason }}
{% endfor %}
{% else %}
### ✅ Keine Ladung geplant
Aktuell sind keine Ladezyklen erforderlich.
{% endif %}
{% else %}
### ⚠️ Kein Plan
Berechnung erfolgt täglich um 14:05 Uhr.
{% endif %}
card_mod:
style: |
ha-card {
padding: 16px;
}
h3 {
margin: 8px 0 4px 0;
font-size: 1.1em;
}
# ===================================================================
# PREIS-OVERVIEW
# ===================================================================
- type: custom:plotly-graph
title: Strompreis 48h
hours_to_show: 48
refresh_interval: 600
layout:
height: 200
margin:
t: 30
b: 30
l: 40
r: 10
showlegend: false
yaxis:
title: ct/kWh
fixedrange: true
entities:
- entity: sensor.hastrom_flex_ext
line:
color: '#FF9800'
width: 2
shape: spline
fill: tozeroy
fillcolor: 'rgba(255, 152, 0, 0.15)'
# ===================================================================
# BATTERIE TREND
# ===================================================================
- type: custom:plotly-graph
title: Batterie SOC 24h
hours_to_show: 24
refresh_interval: 120
layout:
height: 180
margin:
t: 30
b: 30
l: 40
r: 10
showlegend: false
yaxis:
title: '%'
range: [0, 100]
fixedrange: true
entities:
- entity: sensor.esssoc
line:
color: '#2196F3'
width: 3
shape: spline
fill: tozeroy
fillcolor: 'rgba(33, 150, 243, 0.2)'
# ===================================================================
# SCHNELL-EINSTELLUNGEN (Collapsible)
# ===================================================================
- type: conditional
conditions:
- entity: input_boolean.battery_optimizer_enabled
state: 'on'
card:
type: entities
title: ⚙️ Schnelleinstellungen
entities:
- entity: input_number.battery_optimizer_min_soc
- entity: input_number.battery_optimizer_max_soc
- entity: input_number.battery_optimizer_max_charge_power
card_mod:
style: |
ha-card {
border-left: 4px solid #4CAF50;
}
# ===================================================================
# SYSTEM STATUS (Mini)
# ===================================================================
- type: glance
title: System
show_name: true
show_state: true
entities:
- entity: sensor.openems_state
name: OpenEMS
- entity: automation.battery_charging_schedule_calculation
name: Auto Plan
- entity: automation.battery_charging_schedule_execution
name: Auto Exec
card_mod:
style: |
ha-card {
padding: 12px;
}