Files
battery-charging-optimizer/legacy/v3/battery_optimizer_sections_minimal.yaml

214 lines
6.1 KiB
YAML

# ===================================================================
# Batterie-Optimierung Dashboard - SECTIONS LAYOUT (MINIMAL)
# Fokus auf das Wesentliche mit modernem Sections-Layout
# ===================================================================
type: sections
max_columns: 3
title: Batterie Quick
path: battery-quick
icon: mdi:battery-lightning
sections:
# ===================================================================
# SECTION 1: QUICK STATUS
# ===================================================================
- type: grid
cards:
- type: heading
heading: Status
icon: mdi:gauge
- type: custom:bubble-card
card_type: button
entity: sensor.esssoc
name: Batterie
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
- type: custom:bubble-card
card_type: button
entity: sensor.production_activepower
name: PV Aktuell
icon: mdi:solar-power
show_state: true
# ===================================================================
# SECTION 2: STEUERUNG
# ===================================================================
- type: grid
cards:
- type: heading
heading: Steuerung
icon: mdi:toggle-switch
- 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
# ===================================================================
# SECTION 3: ENERGIE-FLUSS
# ===================================================================
- type: grid
cards:
- type: heading
heading: Energie-Fluss
icon: mdi:transmission-tower
- 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
# ===================================================================
# SECTION 4: GEPLANTE LADUNGEN
# ===================================================================
- type: grid
cards:
- type: heading
heading: Geplante Ladungen
icon: mdi:calendar-clock
- type: markdown
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 %}
# ===================================================================
# SECTION 5: PREIS-TREND
# ===================================================================
- type: grid
cards:
- type: heading
heading: Strompreis 48h
icon: mdi:chart-line-variant
- type: custom:plotly-graph
hours_to_show: 48
refresh_interval: 600
layout:
height: 200
showlegend: false
margin:
t: 10
b: 30
l: 40
r: 10
yaxis:
title: ct/kWh
entities:
- entity: sensor.hastrom_flex_ext
line:
color: '#FF9800'
width: 2
shape: spline
fill: tozeroy
fillcolor: 'rgba(255, 152, 0, 0.15)'
# ===================================================================
# SECTION 6: SOC-TREND
# ===================================================================
- type: grid
cards:
- type: heading
heading: Batterie SOC 24h
icon: mdi:battery-charging-80
- type: custom:plotly-graph
hours_to_show: 24
refresh_interval: 120
layout:
height: 180
showlegend: false
margin:
t: 10
b: 30
l: 40
r: 10
yaxis:
title: '%'
range: [0, 100]
entities:
- entity: sensor.esssoc
line:
color: '#2196F3'
width: 3
shape: spline
fill: tozeroy
fillcolor: 'rgba(33, 150, 243, 0.2)'
# ===================================================================
# SECTION 7: SCHNELLEINSTELLUNGEN (Conditional)
# ===================================================================
- type: grid
cards:
- type: heading
heading: Einstellungen
icon: mdi:tune
- type: conditional
conditions:
- entity: input_boolean.battery_optimizer_enabled
state: 'on'
card:
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