Complete reference for Solar Energy Management (SEM).
In v1.6.0, SEM unified its internal EV-budget calculation so that the dashboard, the state machine, and the EV charger all read from the same value (see docs/ARCHITECTURE.md → EV Budget Calculation for the deep dive). As a result, two published sensors now report a different number than they did in 1.5.x:
| Sensor | Pre-1.6.0 | Post-1.6.0 |
|---|---|---|
sensor.sem_available_power |
Raw solar surplus max(0, solar − home − batt_charge) + batt_discharge |
Strategy-aware canonical budget (includes battery redirect when solar_only, includes battery-assist when battery_assist, applies grid floor when min_pv) |
sensor.sem_calculated_current |
round(available_power / (230 × 3)) |
floor(canonical_net_w / (230 × 3)), clamped [0, 16] |
The canonical value is the more honest number — it matches what the state machine actually decides with and what SEM commands on the charger. If your automation depended on the pre-1.6.0 raw-surplus formula, you'll see different (usually higher when the home battery is charging) numbers. The behavioural change is documented in CHANGELOG.md under the v1.6.0 entry; no migration steps are needed beyond updating any thresholds you may have hard-coded in your automations.
- Configuration Options
- Charging Modes
- EV Charging Logic — full decision reference ⭐
- SOC Zone Strategy
- Night Charging
- EV Intelligence
- Battery Discharge Protection
- Surplus Distribution
- Peak Load Management
- Tariff Integration
- Solar Forecast
- Observer Mode
- Sensors Reference
- Daily Energy Reset
All settings are accessible via Settings > Devices & Services > Solar Energy Management > Configure.
| Setting | Description |
|---|---|
ev_connected_sensor |
Binary sensor — is the EV plugged in? |
ev_charging_sensor |
Binary sensor — is charging active? |
ev_charging_power_sensor |
Power sensor (W) — current charging power |
ev_charger_service |
HA service to set current (e.g., keba.set_current) |
ev_charger_service_entity_id |
Entity ID passed to the charger service |
ev_current_sensor |
Current sensor (A) — optional, for actual amperage |
ev_session_energy_sensor |
Session energy (kWh) — optional |
ev_total_energy_sensor |
Cumulative energy (kWh) — optional |
| Setting | Default | Description |
|---|---|---|
update_interval |
10s | Control loop frequency (10-300s) |
power_delta |
— | Minimum power change to trigger update (50-3000W) |
current_delta |
— | Minimum current change threshold (1-10A) |
soc_delta |
— | Battery SOC change sensitivity (1-20%) |
daily_ev_target |
10 kWh | Min of the charge-target range — the guaranteed amount. Night/grid charging tops up to at least this (0-100 kWh). |
daily_ev_target_max |
100 kWh | Max of the range — the solar ceiling. Surplus charges up to this, then stops. Defaults to full (100 = charge freely from sun); lower it to cap surplus. |
ev_target_type |
kwh |
Per-charger target type: kwh or soc. Set via the unit selector in the Charge Target block on the EV card. soc is only offered when a vehicle_soc_entity is configured for that charger. (Renamed from ev_target_mode; old values are migrated automatically.) |
ev_target_soc |
80% | Min SOC of the range (50-100%) — guaranteed via night/grid. When a vehicle_soc_entity is configured, SEM calculates remaining need from SOC instead of kWh. |
ev_target_soc_max |
100% | Max SOC of the range — solar ceiling. Defaults to 100% (charge to full from sun); lower it (e.g. 80%) to cap solar charging for battery longevity. |
ev_battery_capacity_kwh |
40 kWh | EV battery capacity for SOC→kWh conversion (10-120 kWh). |
min_solar_power |
500W | Config floor below which SEM won't even attempt to start the charger. Keep well below the hardware minimum of your charger (~4140 W on 3-phase, ~1380 W on 1-phase). Slider range 0–5000 W. |
max_grid_import |
— | Maximum grid import power during solar charging (0-2000W) |
ev_charging_mode |
pv |
Charging mode: pv (solar only), minpv (Min+PV), off (disabled) |
ev_ramp_rate_amps |
2 | Max current change per 10s cycle during solar charging |
| Setting | Default | Description |
|---|---|---|
battery_priority_soc |
30% | Below: all solar to battery, EV blocked |
battery_minimum_soc |
— | Absolute minimum discharge floor |
battery_resume_soc |
— | Hysteresis resume threshold |
battery_buffer_soc |
70% | Above: battery can discharge for EV |
battery_auto_start_soc |
90% | Above: start EV even without surplus |
battery_assist_max_power |
4500W | Maximum battery discharge for EV (1000-10000W) |
battery_capacity_kwh |
— | Total battery capacity (5-100 kWh) |
battery_discharge_protection_enabled |
true | Protect battery during night charging |
battery_max_discharge_power |
5000W | Maximum battery discharge rate (500-10000W) |
battery_discharge_control_entity |
— | Number entity to control inverter discharge limit |
| Setting | Default | Description |
|---|---|---|
enable_charger_notifications |
true | Show status on charger display (KEBA, Easee, etc.) |
enable_mobile_notifications |
false | Send push notifications |
mobile_notification_service |
— | Notification service: notify.mobile_app_* (HA Companion), rest_command.* (webhooks), or any notify.* (Matrix, Slack, etc.) |
Note: Android notification channels, groups, and action buttons are only sent to
notify.mobile_app_*services. Other services receive message + title only.
SEM supports multiple EV chargers with priority-based surplus distribution:
- Go to Settings → Devices & Services → Solar Energy Management → Configure
- In the EV Chargers menu, select Add another EV charger
- Configure sensors for each charger. For current control, use EITHER:
- Current Control Entity (number entity) — for Wallbox, go-eCharger, and chargers with a
number.*entity - Set-Current Service — for KEBA (
keba.set_current), Easee, and service-based chargers
- Current Control Entity (number entity) — for Wallbox, go-eCharger, and chargers with a
- Set Surplus Priority (1=highest) — highest-priority charger gets power first
Each charger gets its own sensor entities:
sensor.sem_charger_{id}_power— real-time charging powersensor.sem_charger_{id}_session_energy— current session energysensor.sem_charger_{id}_session_solar_share— solar percentagesensor.sem_charger_{id}_taper_trend— BMS taper detectionsensor.sem_charger_{id}_taper_ratio— taper ratio
To edit an existing charger, select it from the charger menu. To remove, select "Remove a charger" (primary charger cannot be removed).
Devices can require other devices to be active before they turn on. Set this from the Control tab on the dashboard:
- Find the device in the priority list
- Use the Requires dropdown to select a parent device
- The child indents under the parent automatically
- To release: set Requires back to None
Dependencies work for both surplus and peak modes:
- Surplus: child only activates when parent is running and surplus available
- Peak shedding: shutting down parent cascades to all children
See Multi-Device Guide for examples.
| Setting | Default | Description |
|---|---|---|
load_management_enabled |
false | Enable peak load management |
target_peak_limit |
5 kW | Target peak power limit (1-15 kW) |
warning_peak_level |
— | Warning threshold (1-15 kW) |
emergency_peak_level |
— | Emergency shedding threshold (1-20 kW) |
critical_device_protection |
— | Protect critical loads from shedding |
| Setting | Default | Description |
|---|---|---|
observer_mode |
false | Read-only mode — no hardware control |
smart_night_charging |
false | Intelligently skip or reduce night charges based on EV SOC, solar forecast, temperature, and learned driving patterns |
daily_home_consumption_estimate |
18 kWh | Fallback for first 7 days of month |
SEM works alongside your existing heating system — it only boosts with solar surplus, it does NOT replace your boiler or heat pump's normal heating schedule. Your existing system continues to handle baseline heating as usual. SEM adds a solar boost layer on top: when surplus solar power is available, SEM heats the water further to store energy that would otherwise be exported.
Configure these settings under Settings > Devices & Services > Solar Energy Management > Configure.
The dashboard exposes exactly two sliders for hot water control:
The temperature SEM heats to during solar surplus periods. When surplus power is available, SEM heats the water up to this target. Once reached, SEM stops heating and releases surplus for other devices (EV, battery, etc.).
If you set the Solar Boost Target to 60°C or above, the Legionella prevention requirement (60°C) is naturally met during sunny days — no separate forced heating cycle is needed on those days.
The minimum temperature for the Legionella prevention cycle. Range: 60-80°C. The legal minimum is 60°C per DVGW W 551 (Germany), SIA 385/1 (Switzerland), and ÖNORM B 5019 (Austria). When a Legionella cycle triggers, SEM heats to this target regardless of solar availability — grid power is used if necessary.
SEM tracks when the water last reached the Legionella target temperature. If the configured interval expires without reaching that temperature, SEM forces a heating cycle. The disinfection interval is configurable in the integration options flow (default 72 hours, range 24-168 hours) but is not exposed on the dashboard — it rarely needs changing.
The Legionella prevention cycle is a safety requirement mandated by building codes. It cannot be turned off. You can adjust the interval and the target temperature (minimum 60°C) in the integration options, but the cycle itself is always active when hot water control is enabled. This protects against dangerous Legionella bacteria growth in stored hot water.
SEM supports four EV charging modes, selectable from the Control tab on the dashboard:
Need the full picture? docs/EV_CHARGING_LOGIC.md is the canonical reference covering all 6 user controls (mode + Overnight grid + Cheapest hours + Smart night + Charge by + Min/Max), their priority cascade, and every interaction scenario including worked examples.
The smart mode. SEM automatically decides the best strategy based on solar forecast and how much charging the EV still needs:
| Situation | What SEM does | Grid import? |
|---|---|---|
| Plenty of sun (forecast >> EV need) | Charge slowly from pure surplus | No |
| Enough sun (forecast ≈ EV need) | Charge with SOC zone strategy + battery assist | Small amount |
| Not enough sun (forecast < EV need) | Charge aggressively with full battery assist | Yes |
The decision recalculates every 10 seconds. On a long summer day, the EV charges slowly from pure surplus (zero import). On a short autumn day, it charges fast to capture all available solar before sunset.
When battery SOC ≥ 90%: battery charge power is redirected to EV (the battery is full enough).
Guarantees a minimum charging current (6A ≈ 4.1kW) from the grid and adds any solar surplus on top. The EV always charges, even without sun.
Best for: you need the car ready by a specific time.
Charges at maximum current immediately, regardless of solar.
EV charging is disabled. SEM continues monitoring but does not control the charger.
SEM uses a four-zone model to decide how the battery and EV share solar energy. The battery's state of charge (SOC) determines which zone is active:
SOC 100% ─────────────────────────────
│ Zone 4: FULL ASSIST │ Battery always helps EV
SOC 90% ─── battery_auto_start_soc ──
│ Zone 3: DISCHARGE ASSIST │ Battery gradually helps EV
SOC 70% ─── battery_buffer_soc ──────
│ Zone 2: SURPLUS ONLY │ EV gets solar surplus only
SOC 30% ─── battery_priority_soc ────
│ Zone 1: BATTERY PRIORITY │ All solar → battery, EV waits
SOC 0% ─────────────────────────────
All solar production goes to the battery. The EV is blocked entirely — the battery needs to reach a usable level first.
The EV receives only pure solar surplus — power that would otherwise be exported. The battery continues charging normally and is never discharged to help the EV. If surplus is below the charger's minimum (~4140W on 3-phase), the EV waits.
The battery begins discharging to supplement solar for the EV. The assist power scales linearly: 50% of max at SOC 70%, up to 100% at SOC 90%. Combined with solar surplus, this often pushes the EV above its minimum charging threshold.
Full battery assist (default 4500W). The EV starts charging even without solar surplus — the battery alone can push the EV above its minimum threshold.
Once battery-assist mode activates (Zone 3 or 4), it stays active even if SOC drops back into Zone 2, all the way down to battery_assist_floor_soc (default 60%). This prevents on/off cycling when the SOC hovers near a zone boundary.
- SOC 30-69% — Battery charges from solar. EV waits (surplus usually below 4140W minimum)
- SOC hits 70% — Battery assist kicks in (~2250W). Combined with surplus, EV may start charging
- SOC hits 90% — Full 4500W battery assist. EV charges near maximum
- SOC drops below 70% — Hysteresis keeps assist active (EV still charging)
- SOC drops below 60% — Assist stops. EV falls back to solar-only surplus
- Conservative setup — Set
battery_priority_socto 70% to ensure the battery is nearly full before the EV gets anything. Good if you have high evening self-consumption. - Aggressive EV charging — Lower
battery_priority_socto 20% andbattery_buffer_socto 50% to start EV charging earlier. - Small battery — Reduce
battery_assist_max_powerto avoid draining a small battery too quickly.
See also: docs/EV_CHARGING_LOGIC.md — full decision matrix covering night charging, the optional Charge by HH:MM deadline, and the optional Cheapest hours (tariff) mode, with worked examples for the edge cases (e.g. cheap window shorter than time-to-Min).
Night charging is opt-in (off by default). SEM is a solar energy manager, so out of the box it charges your car on solar surplus only and never pulls from the grid overnight unasked. To enable grid-assisted night charging, turn on
switch.sem_night_charging(and, for a multi-charger setup, the per-charger…_night_chargingswitch for each charger you want to top up). Upgrading users keep whatever state they already had — only fresh installs and newly-added chargers start off. (#256)
Once enabled, night charging starts automatically when night mode activates (after sunset + 10 minutes, or 20:30, whichever comes first).
- SEM starts the charger at 10A
- Each 10s cycle, SEM adjusts current (+-2A ramp, minimum 8A floor) based on peak load management
- SEM tracks remaining need — either from the vehicle SOC sensor (if configured) or from the daily EV energy counter (kWh fallback)
- Charging stops when the target is reached (vehicle SOC ≥
ev_target_soc, or daily energy ≥daily_ev_target)
The daily EV target uses sunrise-based reset — the counter resets at sunrise, not midnight. This means a night charging session from 22:00 to 06:00 stays in a single daily bucket.
When switch.sem_smart_night_charging is ON, SEM uses the full EV Intelligence system to decide whether to charge overnight:
- SOC-based skip — if the estimated EV SOC covers tomorrow's predicted consumption (with 30% safety margin), SEM skips the night charge entirely
- Solar forecast credit — 30% of tomorrow's forecast is credited, reducing required SOC further
- Temperature correction — consumption predictions adjust for seasonal variation (winter = higher consumption)
- Daily SOC decay — accounts for ~0.5% overnight parasitic drain
- Safety net — maximum 3 consecutive skips to prevent under-charging
- Fallback — when EV Intelligence data is insufficient, SEM falls back to forecast-based reduction (weekday: conservative, weekend: aggressive)
If your EV charger integration provides a vehicle battery SOC sensor, you can configure SEM to use it instead of the fixed kWh target:
- Set
vehicle_soc_entityto your car's battery SOC sensor - Set
ev_target_socto your desired charge limit (default: 80%) - Set
ev_battery_capacity_kwhto your car's battery size
SEM will then calculate remaining charging need from the SOC gap instead of the kWh counter. This is more accurate and lets you set a percentage-based charge limit for battery longevity.
No SOC sensor? SEM uses the EV-intelligence estimate. If you select % mode without a
vehicle_soc_entity, SEM falls back to the virtual SOC from EV intelligence — but only
once it has a confident anchor (after a detected full charge / taper event). The estimate is
a soft ceiling: taper detection is still the hard "battery full" stop, and the night/grid
Min floor still tops up, so an estimate error stays bounded. Until the estimate is
anchored, % mode uses the kWh daily target instead (so it's never a silent no-op).
Driving range. SEM also publishes sensor.sem_ev_remaining_range. If your car
integration exposes a real range sensor, set vehicle_range_entity to it; otherwise SEM
estimates range from SOC × battery capacity ÷ consumption (kWh/100km, default 18).
Battery capacity and efficiency are per car — edit them straight from the EV card
(tap the 🔋 / distance chips under each charger) or in the options flow; the range and
SOC math use that charger's values. vehicle_range_entity is set in the options flow.
Charge-target range (Min/Max). The EV card shows a dual-handle slider: the Min handle is the guaranteed amount (night/grid tops up to it), the Max handle is the solar ceiling (surplus charges up to it, then stops). This replaces the old "limit surplus" switch — set the Max handle instead of toggling a switch.
| Min / Max | Night charging | Surplus charging |
|---|---|---|
| Min = target, Max = full (default) | Stops at Min | Charges freely to full (today's behaviour) |
| Min 50% / Max 80% | Stops at 50% | Continues to 80%, then stops |
| Min 8 kWh / Max 20 kWh | Stops at 8 kWh | Continues to 20 kWh, then stops |
| Min = Max | Stops at target | Stops at the same target |
The classic longevity case: Min 50% / Max 80% — always keep at least 50% (grid-guaranteed, so you can drive), but only let solar push it to 80%, never grid-charging past 50%. Setting Max below full caps surplus; leaving it at full = charge freely from sun.
All settings are per-charger — different vehicles at different chargers can have different
ranges. (Upgrade note: the previous ev_limit_surplus switch is folded into Max — if you had
it on, your Max is set to your old target automatically.)
Charge-by deadline ("be ready by HH:MM"). (#246) Each charger has a Charge By
time (time.sem_charger_<id>_target_time, default 07:00, also editable from the EV card).
When you set it earlier than the night-window end, SEM scales the night-charging current
up so the Min floor is reached by that time:
required_amps = remaining_to_Min ÷ hours_left ÷ (phases × 230 V), clamped to the charger's
min/max. A tight deadline overrides the gentle ramp and the peak limit (you asked for the
car to be ready, so it may pull grid above the peak). If the target physically can't be met in
time (remaining ÷ max_power > hours_left), SEM sends a "can't reach target by HH:MM"
notification instead of silently missing it.
A deadline at/after the night-window end (the default) changes nothing — night charging stays gentle and peak-managed exactly as before. Only an explicit earlier deadline forces current.
Set as default. (#246) Each charger has a Set Target As Default button
(button.sem_charger_<id>_set_default_target) that copies that charger's current Min/Max and
charge-by time into the global defaults, so newly-added chargers inherit them.
Tariff-optimized charging. (#247) Turn on switch.sem_charger_<id>_tariff_optimized
(opt-in, default off; tap the Tariff-optimized toggle on the EV card) to make charging
price-aware — it needs a dynamic tariff:
- At night, SEM defers charging to the cheapest contiguous price window instead of starting
immediately. The state shows
Tariff mode - Waiting for cheap price, and the EV card shows the next cheap window. The Min floor is always guaranteed: if waiting for cheap hours would miss the deadline (or there's no price data), SEM charges anyway regardless of price. - During the day, the Min+PV grid top-up is paused during expensive price hours and resumes automatically when the price drops or solar becomes sufficient. Pure solar-surplus charging is never paused (it's free), and the "Maximum" mode override is left untouched.
SEM learns your EV's charging behavior and driving patterns to make smart decisions about when and how much to charge. Enable via switch.sem_smart_night_charging.
SEM monitors charging power in a 20-minute rolling buffer. When the car's BMS reduces current near full charge (CC→CV transition), SEM detects the characteristic power staircase (e.g., 6290W → 5580W → 4970W → ... → 0W). This provides the most accurate SOC anchor: 100% confirmed without needing a car API.
SEM discriminates between BMS-initiated power reductions and its own setpoint changes by tracking a settling window after each SEM command.
SEM tracks estimated EV battery level by monitoring:
- Energy added during charging sessions
- Predicted daily consumption (subtracted each day)
- Daily parasitic drain (~0.5% SOC decay overnight)
The virtual SOC calibrates from more accurate sources when available:
- Taper detection — resets to 100% when full charge detected
- Vehicle SOC entity — calibrates from real car SOC if
vehicle_soc_entityis configured - Session bootstrapping — first charge session establishes initial estimate
An EWMA predictor (alpha=0.3) learns per-weekday hourly patterns separately:
- "Monday 8 kWh, Wednesday 0 kWh (WFH), Saturday 15 kWh"
- Adapts gradually over 7 days
- Cold-start bootstrap at 3 days minimum data
Consumption predictions adjust for outdoor temperature using Recurrent Auto fleet data (30,000+ vehicles):
- Winter (-5°C): +72% consumption
- Summer (30°C): +9% consumption
- Requires an outdoor temperature sensor (auto-detected from weather entity)
SEM compares energy accepted during full-cycle vs partial-charge sessions over months to estimate capacity degradation. Available as sensor.sem_ev_battery_health.
SEM automatically reads all sources from the HA Energy Dashboard, not just the first:
- Multiple solar inverters — power and energy are summed
- Multiple battery units — power/energy summed, SOC averaged across units
- Multiple grid tariff entries — collected separately
Single-device setups are unaffected — this is fully backward compatible. The config flow shows device counts (e.g., "Solar (2 inverters)") when multiple sources are detected.
SEM supports active control of multiple EV chargers (v1.4.0+). Add chargers via Settings > Devices > Solar Energy Management > Configure > EV Chargers > Add another EV charger.
How surplus distribution works across chargers:
- Chargers are sorted by priority (configurable per charger, 1=highest)
- Highest-priority charger gets surplus first, up to its maximum power
- Remainder cascades to the next charger if it meets the minimum threshold (4140W for 3-phase, 1380W for 1-phase)
- 60-second hysteresis between reallocations to prevent oscillation
- When a charger disconnects, its budget flows immediately to the next
Night charging distributes the nightly target equally across connected chargers.
Per-charger features: Each charger gets its own session tracking, stall detection, enable/disable delays, and taper detection. The primary charger (first configured) drives the EV Intelligence SOC tracking and charge skip decisions.
During night charging, the home battery should only power home consumption — not the EV. SEM enforces this by setting the inverter's discharge limit to match real-time home consumption.
- Updated every 10 seconds to track actual home load
- 100W hysteresis to avoid frequent changes
- Full discharge capability restored when night charging ends or EV disconnects
- Requires a Huawei Solar inverter (or compatible) with a
numberentity for discharge limit control
Every device registered in SEM has a control mode that determines how SEM is allowed to interact with it. This is the most important setting for each device — it defines the boundary between what SEM controls and what the user controls.
| Mode | SEM turns ON? | SEM turns OFF (peak)? | Use case |
|---|---|---|---|
| off | Never | Never | Monitoring only (coffee machine, lights you don't want managed) |
| peak_only | Never | Yes, when peak limit reached | Devices that should stay under user control, but SEM can shed to protect the grid limit (towel heaters, general appliances) |
| surplus | Yes, when solar surplus available | Yes, when surplus drops or peak limit reached | Devices you want SEM to actively control based on solar (hot water heater, pool pump) |
Default for all devices: peak_only — SEM will never proactively turn on a device unless you explicitly set it to surplus mode.
Use the solar_energy_management.update_device_config service:
service: solar_energy_management.update_device_config
data:
device_id: energy_dashboard_heizband
property: control_mode
value: surplusThe mode is persisted across restarts.
EV charging is managed separately by the coordinator's dedicated EV control system (not by the surplus controller). The EV charger's control mode setting does not affect EV charging behavior.
SEM distributes solar surplus across devices that are in surplus mode by priority (1 = highest, 10 = lowest):
- Read available surplus (solar - home - battery charge)
- Subtract regulation offset (default 50W export buffer)
- Iterate surplus-mode devices by priority
- Activate if surplus >= device minimum power
- Variable-power devices get proportional allocation
- When surplus drops: LIFO (lowest priority first) deactivation
Devices in peak_only or off mode are never activated by the surplus controller. They can only be shed by peak load management.
When using dynamic tariffs (Tibber, Nordpool, aWATTar), surplus distribution becomes price-aware: during cheap or negative price periods, SEM adds virtual surplus to encourage activation of surplus-mode devices.
SEM monitors rolling 15-minute average power and progressively sheds loads to stay under your target peak limit. Only devices in peak_only or surplus mode can be shed. Devices in off mode are never touched.
| State | Behavior |
|---|---|
| Normal | No action — all devices run freely |
| Warning | Alert — approaching peak limit |
| Shedding | Automatic device shedding by reverse priority |
| Emergency | All non-critical loads shed immediately |
When the peak drops back below the target, SEM restores devices only if they were ON before shedding. Devices that were already off are not turned on.
Enable via integration options. Requires controllable devices with switch entities.
SEM supports three tariff modes, selectable in Settings > Devices > Solar Energy Management > Configure > Tariff & Advanced:
Fixed import/export rates with optional HT/NT differentiation. SEM applies HT rates during weekday daytime (07:00-20:00) and NT rates at nights/weekends. Configure the rates in the Tariff & Advanced options step.
Set tariff mode to "Dynamic" in the options flow. SEM auto-detects your provider by scanning for known entity patterns, or you can select the price entity manually. When active:
- Reads real-time prices every update cycle (10s)
- Cost calculations use actual spot prices instead of static rates
sensor.sem_tariff_price_levelshows "cheap", "normal", "expensive", "very_cheap", "very_expensive"sensor.sem_tariff_next_cheap_startshows next cheap window- Price-responsive surplus: during cheap/negative price windows, SEM adds virtual surplus to encourage device activation
- Night charging can be scheduled for cheapest hours
- Price card (#257): the
sem-price-cardshows the current price, level, today's min/avg/max, the next cheap window, and an hourly price strip for the next ~24h (bars colored by level, current hour outlined). A compact chip lives at the top of the Home tab (glance), the full panel with chart on the Costs tab. Self-hides on static tariffs (no live curve to show). generate_dashboardreloads live (v1.5.16+) — adding a charger, changing language, or any other regenerate now reflects immediately on the running dashboard. No HA restart needed; a browser hard-refresh (Ctrl+Shift+R) picks up cached card bundles.
| Provider | Region | Detection | Intervals | Feed-in |
|---|---|---|---|---|
| Tibber | Nordics, Germany, NL | Auto (sensor.*electricity_price*) |
60 min | Static |
| Nordpool | Nordics, Baltics | Auto (sensor.nordpool*) |
60 min | Static |
| aWATTar | Austria, Germany | Auto (sensor.awattar) |
60 min | Static |
| Amber Electric | Australia | Auto (sensor.amber_*_general_price) |
30 min | Dynamic (live feed-in rate) |
| Octopus Energy | UK | Auto (sensor.octopus_energy_*_current_rate) |
30 min | Dynamic (export rate sensor) |
| Any other | Any | Manual (select price entity) | Auto-detected | Static or dynamic |
SEM auto-detects Amber when the Amber Electric integration is installed. No manual configuration needed — SEM finds:
- Price sensor (
sensor.amber_*_general_price) — live import price in $/kWh - Forecast sensor (
sensor.amber_*_general_forecast) — 12-hour price forecast (30-min intervals) - Feed-in sensor (
sensor.amber_*_feed_in_price) — live feed-in rate (dynamic export revenue)
With Amber forecasts, SEM optimizes EV charging and battery scheduling around the cheapest 30-minute slots, and avoids price spikes.
Any HA integration that exposes a price sensor works with SEM. If the sensor has a forecasts attribute containing an array of {start_time, per_kwh} or {start, price} objects, SEM will use the forecast data for scheduling optimization. Set the price entity manually in the tariff options.
Set tariff mode to "Calendar" for custom time-of-use schedules. Define rules like "HT weekdays 07:00-20:00, NT otherwise". Features:
- Swiss utility presets built in: EKZ, BKW, CKW, ewz
- Custom weekly schedule via configurable rules
- HA Schedule helper entity support
- Holiday entity override (binary_sensor)
Install Solcast PV Solar or Forecast.Solar for forecast-based features:
sensor.sem_forecast_today_kwh— expected total production today (kWh)sensor.sem_forecast_tomorrow_kwh— expected total production tomorrow (kWh)sensor.sem_forecast_remaining_today_kwh— expected remaining production today (kWh)sensor.sem_charging_recommendation— suggested charging strategy- Forecast-based night target reduction
- Smart battery redirect decisions in the flow calculator
When running two HA instances against the same hardware (e.g., prod + test), enable Observer Mode on the test instance.
SEM continues to:
- Read all sensors
- Calculate energy, flows, costs
- Update all sensor entities
SEM skips:
- All charger service calls
- Battery discharge limit changes
- Device shedding commands
Enable via Settings > Devices & Services > Solar Energy Management > Configure > Observer Mode, or via switch.sem_observer_mode.
sensor.sem_solar_power— current solar productionsensor.sem_grid_power— grid export (positive) / import (negative). Same convention SEM uses internally and reads from Huaweipower_meter_wirkleistung. NOT the HA Energy Dashboard convention.sensor.sem_battery_power— battery charge (positive) / discharge (negative). Pass-through from the source inverter sensor.sensor.sem_grid_import_power— always ≥ 0, derived fromgrid_powersensor.sem_grid_export_power— always ≥ 0, derived fromgrid_powersensor.sem_ev_power— current EV charging powersensor.sem_home_consumption_power— total home power draw (excludes EV)
sensor.sem_daily_solar_energy— today's solar productionsensor.sem_daily_grid_import_energy— today's grid importsensor.sem_daily_grid_export_energy— today's grid exportsensor.sem_daily_ev_energy— today's EV charging energysensor.sem_monthly_*— monthly equivalents
sensor.sem_flow_solar_to_home_power— solar power used by homesensor.sem_flow_solar_to_ev_power— solar power to EVsensor.sem_flow_solar_to_battery_power— solar power to batterysensor.sem_flow_grid_to_ev_power— grid power to EVsensor.sem_flow_battery_to_home_power— battery power to home
sensor.sem_daily_costs— today's grid import costsensor.sem_daily_export_revenue— today's feed-in revenuesensor.sem_daily_savings— today's solar savingssensor.sem_monthly_*— monthly equivalents
sensor.sem_self_consumption_rate— % of solar used locallysensor.sem_autarky_rate— % of consumption from solar+batterysensor.sem_pv_performance_vs_forecast— actual yield vs Solcast/Forecast.Solar predictionsensor.sem_pv_daily_specific_yield— kWh per kWp installedsensor.sem_pv_estimated_annual_degradation— long-term PV health
sensor.sem_charging_state— current charging statesensor.sem_charging_strategy— active strategy (solar_only, battery_assist, etc.)sensor.sem_available_power— power available for EV (W)sensor.sem_calculated_current— target charging current (A)sensor.sem_session_energy— current/last session energy (kWh)sensor.sem_session_solar_share— % of session energy from solarsensor.sem_session_cost— current/last session costsensor.sem_session_duration— session duration (min)
sensor.sem_ev_taper_trend— taper state: "declining", "stable", "rising", "unknown"sensor.sem_ev_taper_ratio— current power as % of session peaksensor.sem_ev_taper_minutes_to_full— estimated minutes remaining to full chargesensor.sem_ev_estimated_soc— virtual SOC estimate (0-100%)sensor.sem_ev_last_full_charge— timestamp of last detected full chargesensor.sem_ev_energy_since_full— kWh consumed since last full chargesensor.sem_ev_predicted_daily_consumption— tomorrow's predicted EV consumption (kWh)sensor.sem_ev_nights_until_charge— estimated nights before charging is neededsensor.sem_ev_charge_needed— boolean: should charge tonight?sensor.sem_ev_battery_health— estimated battery health (%)sensor.sem_ev_charge_skip_reason— human-readable explanation of skip decision
sensor.sem_forecast_today_kwh— today's forecast (kWh)sensor.sem_forecast_tomorrow_kwh— tomorrow's forecast (kWh)sensor.sem_forecast_remaining_today_kwh— remaining today (kWh)sensor.sem_charging_recommendation— suggested strategy
sensor.sem_peak_margin— headroom before peak limit (kW)sensor.sem_consecutive_peak_15min— rolling 15-min average power (kW)sensor.sem_loads_currently_shed— number of devices currently shed
Not all EV chargers support full SEM control. Here are the key differences:
| Charger | Status | Notes |
|---|---|---|
| Tesla Wall Connector | Monitoring-only | No power sensor or current control available in HA. SEM can read voltage/current but cannot control charging. |
| Myenergi Zappi | Monitoring-only | Manages solar surplus internally via built-in diversion logic. SEM can monitor but cannot control current — the Zappi handles surplus charging on its own. |
| KSTAR | Supported via ha-solarman | No dedicated HA integration. Use ha-solarman with KSTAR YAML profiles. |
| Easee | Fully supported | Easee's power sensor is disabled by default in HA. Enable it in Settings > Devices > Easee before configuring SEM. |
SEM resets daily energy counters at sunrise, not midnight. This is intentional:
- Night charging sessions (22:00-06:00) stay in a single daily bucket
- Monthly totals derive from sunrise-based dates
- This may not align with utility billing periods that reset at midnight
The sunrise time comes from HA's sun.sun entity (fallback: 06:00 if unavailable).



