G12W automations overhaul: fixes + Solcast night SOC optimization
🔴 BUG FIXES:
- Wyłącz 06:00: removed grid_charging=ON condition (same bug as 15:00 had).
  Now always resets to Battery First + restores max_charging_current=100A.
- Night charging: removed SOC<95 condition that caused both automations to
  skip when battery was full (programs stayed unchanged from previous night).

🟠 IMPROVEMENTS:
- Merged 'Bardzo pochmurnie' + 'Pochmurnie' (Pn-Czw) into single automation
  'Ustaw ładowanie nocne' with choose for Program 4 based on forecast.
  Eliminates 130 lines of duplicated code.

- Night target SOC now Solcast-based (not always 100%):
  target = min(100, max(40, (load_w*16 - pv_tomorrow_wh) / 143.36 + 10))
  Example: tomorrow 28 kWh PV, load 1500W → target = 40% (saves ~8 kWh grid)
  Example: tomorrow 2 kWh PV, load 2000W → target = 100%

- Sunday 'Niedziela' automation: same Solcast-based target + Program 4 choose.

- mode: single added to ALL 10 automations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 00f9815 commit c724bf87038f3846e39ba737db9d05953e843c92
Wojciech Konieczny authored on 5 Mar
Showing 1 changed file
View
ha-configs/151/automations.yaml