EEBus: reject limits lower than 0W (#25575)

This commit is contained in:
roethigj 2025-11-26 13:37:35 +01:00 • committed by GitHub
parent a65a1ce2d7
commit ff6e4b838c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}
}