Update: Battery Optimizer v3.4.0 mit allen Fixes und Features

This commit is contained in:
felix.zoesch
2025-12-12 08:20:19 +01:00
commit d2a41aad2d
78 changed files with 18053 additions and 0 deletions

View File

@@ -0,0 +1,193 @@
# ============================================
# Battery Charging Optimizer - Dashboard
# ============================================
# Lovelace Dashboard-Karte für die Visualisierung
# Option 1: Als eigene Seite/Tab
title: Batterie-Optimierung
icon: mdi:battery-charging
path: battery-optimizer
cards:
# Status-Karte
- type: entities
title: Batterie-Optimierung Status
show_header_toggle: false
entities:
- entity: input_boolean.battery_optimizer_enabled
name: Optimierung aktiv
- entity: input_boolean.battery_optimizer_manual_override
name: Manueller Override
- entity: sensor.battery_state_of_charge
name: Batterie SOC
- entity: sensor.nächste_ladestunde
name: Nächste Ladung
- entity: sensor.geplante_ladungen_heute
name: Ladungen heute
# Preis-Informationen
- type: entities
title: Strompreis-Informationen
entities:
- entity: sensor.hastrom_flex_pro
name: Aktueller Preis
- entity: sensor.durchschnittspreis_heute
name: Durchschnitt heute
- type: custom:mini-graph-card
entities:
- entity: sensor.hastrom_flex_pro
name: Strompreis
hours_to_show: 24
points_per_hour: 1
line_width: 2
font_size: 75
animate: true
show:
labels: true
points: false
# Konfiguration
- type: entities
title: Konfigurations-Einstellungen
entities:
- entity: input_select.battery_optimizer_strategy
name: Strategie
- entity: input_number.battery_optimizer_price_threshold
name: Max. Ladepreis
- entity: input_number.battery_optimizer_min_soc
name: Minimum SOC
- entity: input_number.battery_optimizer_max_soc
name: Maximum SOC
- entity: input_number.battery_optimizer_max_charge_power
name: Max. Ladeleistung
- entity: input_number.battery_optimizer_reserve_capacity
name: Reserve-Kapazität
# Aktuelle Energieflüsse
- type: entities
title: Aktuelle Werte
entities:
- entity: sensor.pv_power
name: PV-Leistung
- entity: sensor.battery_power
name: Batterie-Leistung
- entity: sensor.house_consumption
name: Hausverbrauch
- entity: sensor.gw_netzbezug
name: Netzbezug
- entity: sensor.gw_netzeinspeisung
name: Netzeinspeisung
# Tages-Statistiken
- type: entities
title: Tages-Energie
entities:
- entity: sensor.today_s_pv_generation
name: PV-Ertrag heute
- entity: sensor.energy_production_tomorrow
name: PV-Prognose morgen (Ost)
- entity: sensor.energy_production_tomorrow_2
name: PV-Prognose morgen (West)
- entity: sensor.today_battery_charge
name: Batterie geladen
- entity: sensor.today_battery_discharge
name: Batterie entladen
- entity: sensor.bought_from_grid_today
name: Netzbezug
- entity: sensor.sold_to_grid_today
name: Netzeinspeisung
# Manuelle Steuerung
- type: entities
title: Manuelle Steuerung
entities:
- type: button
name: Neuen Plan berechnen
icon: mdi:calculator
tap_action:
action: call-service
service: pyscript.calculate_charging_schedule
- type: button
name: Plan jetzt ausführen
icon: mdi:play
tap_action:
action: call-service
service: pyscript.execute_current_schedule
- type: button
name: Laden starten (10kW)
icon: mdi:battery-charging
tap_action:
action: call-service
service: pyscript.start_charging_cycle
service_data:
power_w: -10000
- type: button
name: Laden stoppen (Auto)
icon: mdi:battery-arrow-up
tap_action:
action: call-service
service: pyscript.stop_charging_cycle
- type: button
name: NOTFALL-STOP
icon: mdi:alert-octagon
tap_action:
action: call-service
service: pyscript.emergency_stop
hold_action:
action: none
# Ladeplan-Anzeige (benötigt Custom Card)
- type: markdown
title: Aktueller Ladeplan
content: >
{% set schedule = state_attr('pyscript.battery_charging_schedule', 'schedule') %}
{% if schedule %}
| Zeit | Aktion | Leistung | Preis | Grund |
|------|--------|----------|-------|-------|
{% for hour, data in schedule.items() %}
{% if data.action == 'charge' %}
| {{ hour[11:16] }} | {{ data.action }} | {{ data.power_w }}W | {{ data.price }} ct | {{ data.reason }} |
{% endif %}
{% endfor %}
{% else %}
Kein Ladeplan vorhanden. Berechne Plan um 14:05 Uhr oder klicke auf "Neuen Plan berechnen".
{% endif %}
# Option 2: Als einzelne Karte (zum Einfügen in bestehende Ansicht)
# Kompakte Version:
- type: vertical-stack
title: Batterie-Optimierung
cards:
- type: glance
entities:
- entity: input_boolean.battery_optimizer_enabled
name: Optimierung
- entity: sensor.battery_state_of_charge
name: SOC
- entity: sensor.hastrom_flex_pro
name: Preis jetzt
- entity: sensor.nächste_ladestunde
name: Nächste Ladung
show_name: true
show_state: true
- type: horizontal-stack
cards:
- type: button
name: Neu berechnen
icon: mdi:calculator
tap_action:
action: call-service
service: pyscript.calculate_charging_schedule
- type: button
name: Laden
icon: mdi:battery-charging
tap_action:
action: call-service
service: pyscript.start_charging_cycle
- type: button
name: Stop
icon: mdi:stop
tap_action:
action: call-service
service: pyscript.stop_charging_cycle