EEBus: reject limits lower than 0W (#25575)
This commit is contained in:
parent
a65a1ce2d7
commit
ff6e4b838c
1 changed files with 6 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue