Skip to content

v1.1.9: Localization, schedule card overlay, EV fix, critical removal#66

Merged
traktore-org merged 10 commits into
mainfrom
develop
Apr 19, 2026
Merged

v1.1.9: Localization, schedule card overlay, EV fix, critical removal#66
traktore-org merged 10 commits into
mainfrom
develop

Conversation

@traktore-org
Copy link
Copy Markdown
Owner

Summary

Critical Bug Fix

Full Localization (#60)

  • 208 entity names translated to de/fr/es/it/nl
  • All SEM custom cards localized via sem-localize.js (149 keys × 6 languages)
  • Dashboard template section titles translated at generation time
  • Period selector buttons localized
  • Single source of truth: dashboard/translations.json

Schedule Card Overlay (#63)

  • Surplus row: faded predicted window + solid actual hours overlay
  • EV row: actual charging hours tracked throughout the day
  • Hourly activity tracker in coordinator (resets daily)

UI Cleanup (#65)

  • Removed obsolete 'critical' toggle (superseded by control_mode: off)

Dashboard Fixes

  • Battery icon overflow in SOC arc ring
  • Home tab panel layout for full-width flow card
  • System tab value rounding
  • Consistent precision: kWh=1dp, W=0dp, CHF=2dp

Test plan

  • HA-TEST + HA-PROD deployed and validated
  • EV connected fix verified: SEM now detects KEBA plug correctly
  • German translations verified via Playwright screenshots
  • Schedule card hourly tracker flowing data

Closes #60, #63, #64, #65

🤖 Generated with Claude Code

belinea4071 and others added 10 commits April 19, 2026 19:01
Create dashboard/translations.json (138 keys × 6 languages) as the
single translation file for all dashboard UI text. Both JS cards and
Python generator read from this same file.

- sem-localize.js: fetches translations.json at startup instead of
  inline translation tables
- dashboard_generator.py: reads translations.json, builds reverse
  lookup (English → translated), replaces all title/name/primary/
  subtitle/label strings in the YAML template
- __init__.py: auto-installs translations.json to www/ alongside cards

Covers ALL dashboard strings: section titles, mushroom card names,
status text, metric labels, device modes, schedule labels.

Result: German user sees "Nachtladen", "Prognose-Reduktion",
"Ladeziel Nacht (kWh)", "Überschusssteuerung" etc. across the
entire dashboard — from a single translations.json file.

Refs #60

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lector (#60)

- Revert sem-localize.js from fetch() to inline translations — eliminates
  async loading issues that caused raw keys showing in tab headers
- Add 11 missing translation keys: ApexCharts titles (Energy Costs,
  Battery 24h, etc.), period selector buttons, production labels
- Localize sem-period-selector-card: Heute/Gestern/Diese Woche/etc.
- Regenerate sem-localize.js from translations.json (149 keys x 6 langs)

Dashboard translation now covers ~95% of visible text:
- Tab headers, section titles, card labels, period buttons — all translated
- ApexCharts titles translated via dashboard_generator.py
- Entity names via translations/*.json

Closes #60

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add hourly activity tracker to coordinator:
- _today_surplus_hours: 24-bool array marking hours with surplus > 100W
- _today_ev_hours: 24-bool array marking hours with EV power > 10W
- Resets daily, exposed via surplus_total_w sensor attributes

Schedule card renders two layers per row:
- Surplus row: faded yellow = predicted window (from forecast), solid
  yellow = actual surplus hours that occurred today
- EV row: solid green = actual charging hours, brighter = live charging
- Handles "tomorrow" prefix gracefully (skips, shows nothing)
- Uses predicted_surplus_window as fallback for forecast window

As the day progresses, actual surplus "fills in" over the predicted
background, giving users a visual comparison of forecast vs reality.

Closes #63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Root cause: config flow saves EV plug sensor as 'ev_connected_sensor'
but sensor_reader reads 'ev_plug_sensor'. The key mismatch meant the
EV connected status was NEVER read — SEM always reported "ev disconnected"
even when KEBA showed the car plugged in.

Also fixed: late discovery used dict access on a SensorConfig dataclass
(silently failed). Now uses setattr() with correct key mapping.

Impact: EV solar charging was broken for KEBA auto-discovery users.
Car connected + surplus available = SEM reports "ev disconnected" and
never starts charging.

Fix:
- sensor_reader.py: read from ev_connected_sensor OR ev_plug_sensor
- coordinator.py: use setattr() with discover_key → reader_key mapping

Closes #64

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 'critical' flag is superseded by control_mode: off which already
prevents SEM from touching a device. The critical toggle added confusion
by overlapping with control_mode.

Removed from UI only — backend is_critical checks kept for backwards
compatibility (harmless, devices with control_mode: off are already
filtered from shedding).

Closes #65

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@traktore-org traktore-org merged commit 930936d into main Apr 19, 2026
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