From ff6e4b838c4e900fbacec6100dcb5c08e7691d8c Mon Sep 17 00:00:00 2001 From: roethigj Date: Wed, 26 Nov 2025 13:37:35 +0100 Subject: [PATCH] EEBus: reject limits lower than 0W (#25575) --- hems/eebus/events.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hems/eebus/events.go b/hems/eebus/events.go index 954746ff2..346cecc0b 100644 --- a/hems/eebus/events.go +++ b/hems/eebus/events.go @@ -114,12 +114,16 @@ func (c *EEBus) dataUpdateLimit() { func (c *EEBus) writeApprovalRequired() { for msg, limit := range c.cs.CsLPCInterface.PendingConsumptionLimits() { c.log.DEBUG.Println("CS LPC PendingConsumptionLimit:", msg, limit) + if limit.Value < 0 { + c.cs.CsLPCInterface.ApproveOrDenyConsumptionLimit(msg, false, "negative limit") + continue + } + c.cs.CsLPCInterface.ApproveOrDenyConsumptionLimit(msg, true, "") c.mux.Lock() - defer c.mux.Unlock() - c.consumptionLimit = &limit + c.mux.Unlock() } }