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
Renumbers the in-flight release from 1.7.0 to 1.6.3. The entity
removals (`night_charging`, `smart_night_charging`, `tariff_optimized`
switches; `ev_charging_mode` select) are treated as a patch by the
maintainer's policy — the named `Charge mode` selector carries the
same intent so existing automations only need an entity rename, not a
behaviour rewrite.
Doc sweep for the renamed entities so first-touch users land on the
new model:
- README — Charging Modes section rewritten around the 5 named modes
(Solar only / Solar + cheapest hours / Min + Solar / Always (max) /
Off). Cheap-tariff example automation switched from `switch.turn_on`
on `night_charging` to `select.select_option` on `charge_mode`.
- EV_CHARGING_LOGIC.md — v1.6.3 banner at top with the new mode table;
the legacy toggle-architecture body kept as historical reference for
migrating users. Embeds the refreshed EV-tab screenshot.
- QUICK_START / SETUP_GUIDE / MULTI_DEVICE_GUIDE — entity tables now
show `select.sem_charger_<id>_charge_mode` instead of the removed
switches.
- images/ — sem_ev_tab.png and sem_home_tab.png recaptured from
HA-PROD on v1.6.3; the EV card screenshot is the canonical visual
for the new Charge mode selector (label, value, hint line all
localized — visual proof the #301 cache-bust fix lands).
- CHANGELOG — the prose reference to "v1.7.0 Phase C makes
min_plus_solar zone-adaptive" reads as "v1.6.3 Phase C" so the
in-section narration matches the header.
- tests/test_dashboard_generator.py — version literal in the
`_content_hash_cache_bust` fixtures bumped to 1.6.3 for consistency
(behaviour unchanged; the helper accepts any version string).
manifest.json: 1.7.0 -> 1.6.3.
2136 / 2136 tests passing.
Copy file name to clipboardExpand all lines: README.md
+30-17Lines changed: 30 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,33 +192,42 @@ Enable peak load management if your utility bills based on peak demand:
192
192
193
193
## User Controls
194
194
195
-
SEM is designed to be mostly automatic. The switches that matter:
195
+
SEM is designed to be mostly automatic. The controls that matter (v1.6.3 — toggle-soup replaced by a single named selector, #277):
196
196
197
-
|Switch| Default | What it does |
197
+
|Entity| Default | What it does |
198
198
|--------|---------|-------------|
199
199
|`switch.sem_observer_mode`| OFF | Read-only mode — SEM monitors but doesn't control hardware (global) |
200
-
|`switch.sem_charger_<id>_night_charging`| OFF |**Per-charger** (#255). Enable/disable overnight grid charging for that charger (opt-in — solar surplus only until you turn it on; #256) |
201
-
|`switch.sem_charger_<id>_smart_night_charging`| OFF |**Per-charger** (#255). Intelligently skip/reduce that charger's night charge based on EV SOC, solar forecast, temperature, and learned patterns |
200
+
|`select.sem_charger_<id>_charge_mode`|`Min + Solar`|**Per-charger.** One named selector carries the night-charging, smart-night, and tariff-window intent that used to live on three separate switches. Options: *Solar only* / *Solar + cheapest hours* / *Min + Solar* / *Always (max)* / *Off*. |
202
201
203
-
EV charge targets, charging mode, currents, phases and consumption are all **per-charger** entities too (`number.sem_charger_<id>_…`, `select.sem_charger_<id>_…`) — the global EV settings were removed in #255 (per-charger is the source of truth; globals are read-only summaries). Everything else — solar charging, surplus distribution, battery protection, peak management — is fully automatic.
202
+
EV charge targets, currents, phases and consumption are all **per-charger** entities too (`number.sem_charger_<id>_…`, `select.sem_charger_<id>_…`) — the global EV settings were removed in #255 (per-charger is the source of truth; globals are read-only summaries). Everything else — solar charging, surplus distribution, battery protection, peak management — is fully automatic.
204
203
205
204
---
206
205
207
-
## Charging Modes
206
+
## Charging Modes (v1.6.3)
208
207
209
-
### Solar Charging (default)
208
+
The per-charger `Charge mode` selector replaces the four-toggle soup with five named modes. Each mode composes with the existing Charge Target range (Min / Max) and the Charge by HH:MM deadline.
210
209
211
-
During the day, SEM dynamically adjusts the EV charging current (6-32A) to match real-time solar surplus. If surplus drops below the minimum threshold, charging pauses until surplus returns. The battery's SOC determines how aggressively SEM uses stored energy to help the EV (see [Setup Guide — SOC Zones](docs/SETUP_GUIDE.md#soc-zone-strategy)).
210
+
### Solar only
212
211
213
-
### Min+PV (Minimum + Solar)
212
+
Pure surplus, never grid. Equivalent to the legacy `self_consumption` + `night_charging=OFF`. Pick this if you only ever want to charge from sun.
214
213
215
-
Guarantees a minimum charging current (6A) from the grid and adds solar surplus on top. Use this when you need the car charged by a deadline but still want to maximize solar usage.
214
+
### Solar + cheapest hours
216
215
217
-
Set via integration options: `ev_charging_mode = "minpv"`.
216
+
Surplus by day, grid only in the cheapest contiguous tariff window at night (Min still guaranteed by the deadline). Hidden if no dynamic tariff is configured. Equivalent to `auto` + `tariff_optimized=ON`.
218
217
219
-
### Night Charging
218
+
### Min + Solar (default)
220
219
221
-
**Opt-in (off by default).** SEM charges on solar surplus only until you enable overnight grid charging — so a fresh install never pulls from the grid unasked. Once enabled with `switch.sem_night_charging` (and the per-charger switch in a multi-charger setup), overnight grid charging starts automatically after sunset, runs at a peak-managed rate to avoid demand spikes, and stops when the daily EV target is reached. Battery discharge protection prevents the home battery from powering the EV overnight. Upgrading users keep their existing setting.
220
+
Guarantees Min by deadline, solar adds up to Max. **Zone-adaptive during the day** — the Min guarantee comes from NIGHT charging top-up, not forced grid pull at noon. During the day the strategy machine still consults the SOC zone (battery priority when low, surplus when high, battery-assist in Zone 4). Most users want this.
221
+
222
+
### Always (max)
223
+
224
+
Charge at maximum regardless of source. Strict "Min from grid at all times" behaviour — equivalent to the legacy `minpv` mode.
225
+
226
+
### Off
227
+
228
+
No charging. SEM monitors but issues no commands to the charger.
229
+
230
+
Battery discharge protection prevents the home battery from powering the EV overnight regardless of mode.
222
231
223
232
### Battery-Assisted Charging
224
233
@@ -310,7 +319,7 @@ SEM creates 70+ sensors organized by category:
310
319
311
320
## EV Intelligence
312
321
313
-
SEM learns your EV's charging behavior and makes smart decisions about when to charge. Enable via `switch.sem_smart_night_charging`.
322
+
SEM learns your EV's charging behavior and makes smart decisions about when to charge. Implicit in the `Min + Solar` and `Solar + cheapest hours` Charge modes (v1.6.3); was the standalone `smart_night_charging` switch in v1.6.x.
> ``smart_night_charging`` × ``tariff_optimized``) with one named
10
+
> per-charger ``Charge mode`` selector. The five modes are:
11
+
>
12
+
> | Mode | What it does | When to pick |
13
+
> |---|---|---|
14
+
> |**Solar only**| Pure surplus, never grid | Solar maximalist |
15
+
> |**Solar + cheapest hours**| Surplus by day, grid only in the cheapest tariff windows (hidden if no dynamic tariff configured) | Dynamic-tariff users |
16
+
> |**Min + Solar** (default) | Guarantee Min from grid/night top-up, solar adds up to Max. Zone-adaptive during the day — Min comes from night charging, not forced grid pull at noon. | Daily commuter needing a baseline |
17
+
> |**Always (max)**| Charge at maximum regardless of source | "Just charge the car" / strict legacy-``minpv`` behaviour |
18
+
> |**Off**| No charging | Disabled |
19
+
>
20
+
> Plus the existing **Charge Target range** (Min / Max), **Charge by HH:MM** deadline, and **Set as default** button as the per-mode detail. The old standalone switches (``night_charging``, ``smart_night_charging``, ``tariff_optimized``, ``ev_charging_mode``) are **removed** — automations that read them must read the new ``select.sem_charger_<id>_charge_mode`` instead.
21
+
>
22
+
> The behavioural-priority cascade below (Min ▷ Charge by ▷ Cheapest hours ▷ Smart night ▷ Mode ▷ Surplus) still applies — the **intent** moved into the mode selector. A full rewrite of this guide tracking the new model is tracked separately; the historical detail below remains accurate for the pre-v1.6.3 toggle layout but the entity names have changed.
23
+
24
+
---
25
+
26
+
## Legacy reference (pre-v1.6.3)
27
+
28
+
The sections below describe the toggle architecture that v1.6.3 consolidated. Kept for now so existing dashboards and automations migrating off the old switches have a reference; will be rewritten in a follow-up release to describe only the new mode selector.
29
+
3
30
SEM's EV controller takes input from up to **6 user controls** plus solar, battery, grid, and (optionally) tariff prices. This guide is the canonical reference for how those inputs interact.
Copy file name to clipboardExpand all lines: docs/MULTI_DEVICE_GUIDE.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,18 +77,19 @@ This guide covers setting up SEM with different hardware combinations. SEM auto-
77
77
78
78
> **Important**: Use EITHER the number entity OR the service. Leave the other blank.
79
79
80
-
### Per-Charger Settings (v1.5.2+)
80
+
### Per-Charger Settings (v1.5.2+; consolidated in v1.6.3)
81
81
82
-
Each charger gets its own night charging configuration:
82
+
Each charger gets its own EV charging configuration:
83
83
84
84
| Entity | Description |
85
85
|--------|-------------|
86
86
|`number.sem_charger_{id}_daily_ev_target`| Night charging target (kWh) per charger |
87
+
|`number.sem_charger_{id}_daily_ev_target_max`| Solar-surplus ceiling (kWh) per charger |
87
88
|`number.sem_charger_{id}_night_initial_current`| Start amps for night charging |
88
89
|`number.sem_charger_{id}_minimum_current`| Minimum charging current (A) |
89
-
|`switch.sem_charger_{id}_night_charging`|Enable/disable night charging per charger|
90
+
|`select.sem_charger_{id}_charge_mode`|Per-charger Charge mode (Solar only / Solar + cheapest hours / Min + Solar / Always (max) / Off). v1.6.3 replacement for the legacy `night_charging`, `smart_night_charging`, `tariff_optimized` switches.|
90
91
91
-
You can set different targets per car — e.g., 15 kWh for a large EV, 8 kWh for a plug-in hybrid. These settings are also editable in the config flow (Settings → Integrations → SEM → Configure → Edit charger).
92
+
You can set different modes and targets per car — e.g., *Min + Solar* with 15 kWh Min for a daily commuter, *Solar only* with 8 kWh Max for a plug-in hybrid. These settings are also editable in the config flow (Settings → Integrations → SEM → Configure → Edit charger).
Copy file name to clipboardExpand all lines: docs/QUICK_START.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,13 +150,12 @@ Once installed, SEM runs without manual intervention:
150
150
-**Night charging** — *opt-in (off by default)*; when enabled, grid-charges the EV to your daily-target floor
151
151
-**Smart forecast** — if tomorrow is sunny, tonight's grid charging is reduced or skipped
152
152
153
-
The three switches that matter most:
153
+
The controls that matter most (v1.6.3 — `night_charging` and `smart_night_charging` switches replaced by the per-charger `Charge mode` selector):
154
154
155
-
|Switch| Default | Purpose |
155
+
|Entity| Default | Purpose |
156
156
|--------|---------|---------|
157
-
|`switch.sem_night_charging`|OFF | Opt-in: grid-charges EV overnight to the daily-target floor (off by default → solar surplus only)|
157
+
|`select.sem_charger_<id>_charge_mode`|`Min + Solar`| Per-charger intent: Solar only / Solar + cheapest hours / Min + Solar / Always (max) / Off. The named mode carries the night-charging and tariff-window intent that used to live on separate switches.|
158
158
|`switch.sem_observer_mode`| OFF | Monitor-only, no hardware control |
159
-
|`switch.sem_smart_night_charging`| OFF | Reduces overnight charging when a good solar forecast exists |
Copy file name to clipboardExpand all lines: docs/SETUP_GUIDE.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -341,13 +341,12 @@ must be stable for 60 seconds before a notification fires).
341
341
| Update interval (s) | 10 | How often SEM reads sensors and adjusts devices. Lower values are more responsive but use more CPU. Values below 5 are not recommended. Raise it to 30 if you are on low-powered hardware and SEM is using too much CPU. |
342
342
| Power delta (W) | 50 | Minimum power change before SEM updates a device. Prevents constant small adjustments. Raise it if you see too many small current adjustments to the EV charger. |
343
343
344
-
### Switches for use in automations
344
+
### Controls for use in automations
345
345
346
-
|Switch| Purpose |
346
+
|Entity| Purpose |
347
347
|--------|---------|
348
-
|`switch.sem_night_charging`|Enable or disable overnight EV charging|
348
+
|`select.sem_charger_<id>_charge_mode`|Per-charger EV intent (v1.6.3) — Solar only / Solar + cheapest hours / Min + Solar / Always (max) / Off. Replaces the legacy `night_charging`, `smart_night_charging`, `tariff_optimized` switches and `ev_charging_mode` select.|
349
349
|`switch.sem_observer_mode`| Toggle read-only mode without reinstalling |
350
-
|`switch.sem_smart_night_charging`| Toggle forecast-aware night charge evaluation |
351
350
352
351
### Dashboard settings
353
352
@@ -477,13 +476,16 @@ EV charger card — one place, per charger, no config-flow round-trips:
477
476
Max handle of the range slider — solar-surplus charging stops once this ceiling is
478
477
reached. Defaults to full (charge freely from sun); lower it to cap surplus. (Replaces
479
478
the former *Limit surplus* switch.)
480
-
-**Night charging** (`switch.sem_charger_<id>_night_charging`): when on, off-peak/night
481
-
charging tops the car up to the target.
482
-
483
-
These three controls are independent, so all eight combinations of
484
-
target type × surplus-limit × night-charging are supported. (The old `surplus_target`
485
-
device mode and scattered config-flow toggles have been removed; existing
486
-
`ev_target_mode` settings are migrated to `ev_target_type` automatically.)
479
+
-**Charge mode** (`select.sem_charger_<id>_charge_mode`, v1.6.3): the per-charger
480
+
intent that carries the night-charging + tariff-window decision. Picking
481
+
*Min + Solar* (the default) or *Solar + cheapest hours* implicitly enables
482
+
the night-window top-up to the Min target; picking *Solar only* skips it.
483
+
484
+
These controls compose freely (Target type × Solar-max × Charge mode). The legacy
0 commit comments