Fix proactive charging, logging, and status page ordering
1. SOC high bypass: when SOC >= soc_high_bypass_pct (default 90%), activate car charging without requiring a good forecast. Solves today's missed charging window where 4kW was exported for 6h with a full battery because the intraday forecast dropped from 15.4 to 13.3 kWh. 2. Log ambient_c in every cycle: makes it diagnosable why isHeatingPeriod suppresses SG-Ready on warm days (heating_min_ambient_c: 15°C gate). 3. Consumer names in logs: replace slog integer Consumer values with .String() so logs show "wallbox_a" instead of "2". 4. Status page order: reorder consumers by EMS priority (WallboxA → WallboxB → WW → SG-Ready) instead of the old reversed order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,12 +23,12 @@ var consumerMeta = map[engine.Consumer]struct{ Label, Icon string }{
|
||||
engine.ConsumerWallboxB: {"Wallbox B (4 kW)", "🔌"},
|
||||
}
|
||||
|
||||
// consumerOrder defines the display order of consumers.
|
||||
// consumerOrder defines the display order of consumers — highest EMS priority first.
|
||||
var consumerOrder = []engine.Consumer{
|
||||
engine.ConsumerSGReady,
|
||||
engine.ConsumerWW,
|
||||
engine.ConsumerWallboxA,
|
||||
engine.ConsumerWallboxB,
|
||||
engine.ConsumerWW,
|
||||
engine.ConsumerSGReady,
|
||||
}
|
||||
|
||||
// consumerRecord tracks the state of a single consumer across cycles.
|
||||
|
||||
Reference in New Issue
Block a user