Skip to content

Release v1.5.6: German translations, K-Flow integration, load management UX, diagram card fix#217

Merged
traktore-org merged 12 commits into
mainfrom
develop
May 20, 2026
Merged

Release v1.5.6: German translations, K-Flow integration, load management UX, diagram card fix#217
traktore-org merged 12 commits into
mainfrom
develop

Conversation

@traktore-org
Copy link
Copy Markdown
Owner

@traktore-org traktore-org commented May 18, 2026

Summary

  • 52 German translation fixes — incorrect terms (home→Haus, idle→Leerlauf, session→Ladevorgang), energy terminology (Import→Netzbezug), compound nouns, consistency
  • K-Flow card integration (Energy flow proposal #206) — automatic entity mapping, PV string autodetection, diagram_style selector in config flow
  • K-Flow entity preservation — smart merge preserves user-customized entities on dashboard regeneration
  • K-Flow entity mapping fixconsumptconsump typo causing 0W home consumption
  • SOC target for EV charging (Ability to set a SOC target for EV charging #215)
  • Load management UX (Several Questions and Comments on load management #219) — configure/edit button for all devices, power-based ON detection, ON/OFF translated, smart power format
  • SEM diagram card fix — card was incorrectly removed as "legacy resource" on restart, now properly registered as standalone Lovelace resource
  • Config flow compatibility — replaced SelectOptionDict with plain dicts for older HA versions
  • Translation verification script (scripts/verify_translations.py)
  • CI test fixtest_calculate_costs date mock

Test plan

  • Verify German labels on system diagram (Haus, Leerlauf, Netzbezug)
  • K-Flow card renders correctly with correct entity mappings (verified on HA-TEST)
  • SEM diagram card renders on HA-PROD (was broken, now fixed)
  • HA-PROD validation passed (257 entities, no errors)
  • Load management configure button works for all devices
  • CI tests pass (3.12 + 3.13, Hassfest, HACS)

belinea4071 added 9 commits May 18, 2026 21:53
Unified remaining-need calculation picks best source (vehicle SOC or kWh
target). New per-charger ev_limit_surplus toggle stops surplus charging at
target. Covers four user profiles: no SOC + unlimited surplus (default),
SOC + limited, SOC + limited (RienduPre), no SOC + limited.

- Add _calculate_remaining_need() helper, unify both call sites
- Add soc_limit_active field on ChargingContext, gate SOLAR_TARGET_REACHED
- Per-charger config: ev_target_soc, ev_battery_capacity_kwh, ev_limit_surplus
- Per-charger context patching in multi-charger loop
- 13 new tests covering all profiles and edge cases
- Update docs: USER_GUIDE, SETUP_GUIDE, ARCHITECTURE, README
…ection (#206)

- Add discover_pv_strings_from_registry() with 6 regex patterns covering
  Huawei, GoodWe, Growatt, Kostal, Sungrow, Fronius, SolarEdge, Victron
  + multi-inverter fallback for pv1-pv4 slots
- Add discover_battery_details_from_registry() detecting inverter temp,
  battery temp1/2, BMS/MOS temp, voltage, current, min/max cell voltage
- Add grid_active_power sensor (positive=import convention for K-Flow)
- Add _inject_kflow_card() in dashboard generator: replaces
  sem-system-diagram-card with K-Flow when installed via HACS,
  auto-maps 13 SEM entities + autodetected hardware detail sensors
- Falls back to sem-system-diagram-card when K-Flow is absent
- 15 new tests covering PV string, battery detail, and regression cases
…lanking

- Add German locale regex patterns for Huawei: busspannung (voltage),
  busstrom (current), interne_temperatur (inverter temp)
- Explicitly blank all unused K-Flow entity fields to prevent the card's
  internal GoodWe defaults from appearing on non-GoodWe systems
- Fix section toggle names: K-Flow uses _show_battery/_show_ev (prefixed)
- Add test_huawei_german_locale test case
- home: "Start" → "Haus" (system diagram label)
- idle: "Bereit" → "Leerlauf" (was confused with Ready)
- session: "Sitzung" → "Ladevorgang" (EV charging context)
- Import/Export rates: standardized to Bezugstarif/Einspeisetarif
- Compound nouns: "Solar Energie Management" → "Solar-Energiemanagement"
- Cooldown: "Abkühlzeit" → "Wartezeit" (timer, not temperature)
- Fenster → Zeitfenster, Fahrplan → Zeitplan, and 40+ more fixes
- Add scripts/verify_translations.py for cross-language QA
- Regenerated sem-localize.js
Convert the K-Flow toggle from a boolean (use_kflow_card) to a
dropdown select (diagram_style) with values "sem" (default) and
"kflow". This makes it easy to add more diagram styles in the future.

- Add diagram_style to hardware step (initial config) and settings
  step (options flow) as a dropdown selector
- Update dashboard_generator to read diagram_style instead of
  use_kflow_card, with backward compat for existing installs
- Add strings and data_description for all 15 languages
- Fix typo: consumpt → consump (K-Flow field name for home consumption)
  This caused the home load to show 0 W on the K-Flow card.
- Preserve user customizations when regenerating dashboard: if a K-Flow
  card already exists, merge SEM entity fields into it instead of
  clearing and replacing. User styling (colors, labels, inverter_name)
  is kept intact.
#219 Load management fixes:
- Configure/edit button now shown for ALL devices (not just unmapped)
- Power-based ON detection: device shown as ON if power > 10W even
  when switch entity reports OFF (Shelly hidden switch issue)
- ON/OFF labels translated (Aan/Uit, An/Aus, etc.)
- Smart power format: shows W for < 100W, kW for larger values
- Added 'on' translation key to all 15 languages

#206 K-Flow preservation:
- Smart merge when regenerating dashboard: only updates entity fields
  that are empty or still point to sensor.sem_* entities
- User-customized entity mappings (non-SEM entities) are preserved
# Conflicts:
#	dashboard/card/sem-localize.js
#	dashboard/translations.json
- Fix test_calculate_costs: mock dt_util.now() so the test date matches
  the seeded accumulators (was using hardcoded past date)
- Replace SelectOptionDict with plain dicts for HA version compatibility
- Bump version to 1.5.7
@traktore-org traktore-org changed the title Release: K-Flow integration, per-charger EV, translations, dashboard polish Release v1.5.7: German translations, K-Flow integration, load management UX May 20, 2026
belinea4071 added 2 commits May 20, 2026 22:13
The sem-system-diagram-card.js is a standalone vanilla JS card, NOT
part of the Lit bundle (sem-cards.js). It was incorrectly listed in
the legacy cleanup, causing it to be removed from Lovelace resources
on every restart — making the diagram invisible on the Home tab.

- Remove sem-system-diagram-card.js from legacy cleanup list
- Add explicit registration for the diagram card as Lovelace resource
@traktore-org traktore-org changed the title Release v1.5.7: German translations, K-Flow integration, load management UX Release v1.5.6: German translations, K-Flow integration, load management UX, diagram card fix May 20, 2026
@traktore-org traktore-org merged commit bd1a777 into main May 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant