v1.1.9: Localization, schedule card overlay, EV fix, critical removal#66
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Critical Bug Fix
ev_connected_sensorvsev_plug_sensor). Solar EV charging was broken for all KEBA auto-discovery users.Full Localization (#60)
dashboard/translations.jsonSchedule Card Overlay (#63)
UI Cleanup (#65)
Dashboard Fixes
Test plan
Closes #60, #63, #64, #65
🤖 Generated with Claude Code