You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9556b9c
Browse filesBrowse the repository at this point in the historyBrowse files
diag: v2.2.2 — console logging for charging detection
Banner/tile can show "not charging" while a charging-power sensor reads
charging. Add browser-console diagnostics to pinpoint the break:
- setConfig one-shot: prints charging_power_entity / _entities /
charger_status_entity / phase_mode actually present in the card config
(reveals a stale auto-dashboard config that never received the sensor).
- _isDrawingNow throttled live log: per-change dump of each mapped entity's
raw state + unit_of_measurement + computed watts, the summed total, the
200 W floor, basis (measured vs status fallback), and the drawing_now verdict.
Purely additive logging; no behaviour change. Backend chain verified correct
(reconfigure merges CONF_CHARGING_POWER; dashboard_manager maps it).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
**DIAGNOSTIC: console logging for charging detection (banner/tile stuck on "not charging")**
761
+
762
+
**Problem**: a user mapped a charging-power sensor that was clearly reporting charging, yet the dashboard's green banner and the "Charging Power" tile both showed "not charging". Frontend-only, so the chain (config → card config → `_isDrawingNow`) had to be inspected live.
-**One-shot config dump** in `setConfig` — `[EVSC Dashboard] charging detection config:` prints `charging_power_entity` / `charging_power_entities` / `charger_status_entity` / `phase_mode`. If these read `(missing)` the card config is stale (reload the Lovelace page; if still missing, restart HA — the auto-dashboard card config is rewritten on setup).
766
+
-**Throttled live diagnostic** from `_isDrawingNow` — `[EVSC Dashboard] charging detection:` prints, per change, the mapped entity/entities, each **raw state + unit_of_measurement + computed watts**, the summed `measured_total_watts`, the 200 W `floor_watts`, the `basis` (measured-power vs status-fallback), the `charger_status_state`, and the final `drawing_now`. Logs only when something changes (no console spam).
767
+
768
+
This makes the two most likely causes self-evident: (a) the sensor not reaching the card config (stale dashboard), or (b) a unit/value issue — e.g. a kW sensor with no `unit_of_measurement` attribute read as watts (3.7 W < the 200 W floor → "not charging").
769
+
770
+
**Backend verified** unchanged and correct: the reconfigure flow merges `CONF_CHARGING_POWER` into `entry.data` (`_merge_entry_data`), and `dashboard_manager._build_card_config` maps it to `charging_power_entity` (+ per-phase `charging_power_entities`). No behaviour change — purely additive console logging. **Files**: `frontend/ev-smart-charger-dashboard.js`, `const.py`, `manifest.json`. `VERSION = "2.2.2"`.
771
+
772
+
**Upgrade priority**: 🟢 RECOMMENDED if your charging banner/tile is stuck on "not charging" with a power sensor mapped — open the browser console (DevTools) after reloading the dashboard and read the two `[EVSC Dashboard] charging detection…` lines.
773
+
774
+
---
775
+
759
776
### v2.2.1 (2026-06-01)
760
777
**FIX: Touch scroll stuck on dashboard cards (could only scroll on empty gaps)**
0 commit comments