Fix compressor watts, add WW boost reset button
Compressor: - metric changed to PromQL expression that returns actual watts: sensors_power_value(%) × power_value(kW) × 10 e.g. 27% × 10 kW = 2700 W; idle = 0 W - idle threshold raised 20→500 W (clean gap: 0W idle vs ≥2700W running) - status page now displays real kW instead of percent WW boost reset: - Added 🌡️ Zurücksetzen button to WW consumer card (when configured) - POST /ww/reset: restores WWBaseC via Viessmann API + blocks re-boost via engine override until midnight - IsWW field added to consumerView for template control Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,7 @@ type consumerView struct {
|
||||
Reason string
|
||||
Unconfigured bool
|
||||
CanOverride bool // true for Shelly consumers (hardware read-back available)
|
||||
IsWW bool // true for ConsumerWW — shows reset button instead of override
|
||||
ManualOverride bool
|
||||
OverrideUntil time.Time
|
||||
LivePowerW float64 // from Shelly PM; 0 for non-PM devices
|
||||
@@ -334,6 +335,7 @@ func (s *Store) Handler() http.HandlerFunc {
|
||||
Since: rec.since,
|
||||
Reason: rec.reason,
|
||||
CanOverride: c != engine.ConsumerWW,
|
||||
IsWW: c == engine.ConsumerWW,
|
||||
ManualOverride: rec.manualOverride,
|
||||
OverrideUntil: rec.overrideUntil,
|
||||
LivePowerW: rec.livePowerW,
|
||||
@@ -895,6 +897,11 @@ h1 { font-size: 1.4rem; font-weight: 700; color: #14532d; }
|
||||
{{end}}
|
||||
</form>
|
||||
{{end}}
|
||||
{{if and .IsWW (not .Unconfigured)}}
|
||||
<form method="post" action="/ww/reset" style="flex-shrink:0">
|
||||
<button type="submit" class="override-btn turn-off" title="WW-Solltemperatur auf Basiswert zurücksetzen, Boost für heute sperren">🌡️ Zurücksetzen</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user