EEBus: release §14a/LPC limit when it expires (#31393)
This commit is contained in:
parent
56513e3489
commit
eb293b285a
2 changed files with 6 additions and 3 deletions
|
|
@ -369,7 +369,9 @@ func (c *EEBusOHPCF) Dimmed() (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
return limit.IsActive && limit.Value > 0, nil
|
||||
// an active limit means dimmed; the applied §14a limit value is 0W, so a
|
||||
// value-based check would never report the dimmed state and never release it
|
||||
return limit.IsActive, nil
|
||||
}
|
||||
|
||||
// Dim implements the api.Dimmer interface. It writes a §14a/LPC consumption
|
||||
|
|
|
|||
|
|
@ -231,8 +231,9 @@ func (c *EEBus) Dimmed() (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
// Check if limit is active and has a valid power value
|
||||
return limit.IsActive && limit.Value > 0, nil
|
||||
// an active limit means dimmed; the applied limit value is 0W, so a
|
||||
// value-based check would never report the dimmed state and never release it
|
||||
return limit.IsActive, nil
|
||||
}
|
||||
|
||||
// Dim implements the api.Dimmer interface
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue