EEbus: only disable recommendations if available (#15829)
Some EEBUS wallboxes like the PCMP do report the OSCEV usecase to be available, but it doesn’t provide the necessary recommendation limit data. This change adds checks for this case.
This commit is contained in:
parent
6a3aeb2212
commit
095fa42be9
1 changed files with 12 additions and 2 deletions
|
|
@ -343,8 +343,13 @@ func (c *EEBus) writeCurrentLimitData(evEntity spineapi.EntityRemoteInterface, c
|
|||
}
|
||||
|
||||
// make sure the recommendations are inactive, otherwise the EV won't go to sleep
|
||||
if err := c.disableLimits(evEntity, c.uc.OscEV); err != nil {
|
||||
return err
|
||||
// but only if it supports OSCEV and has required data!
|
||||
if c.uc.OscEV.IsScenarioAvailableAtEntity(evEntity, 1) {
|
||||
if _, err := c.uc.OscEV.LoadControlLimits(evEntity); err == nil {
|
||||
if err := c.disableLimits(evEntity, c.uc.OscEV); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set overload protection limits
|
||||
|
|
@ -419,6 +424,11 @@ func (c *EEBus) writeLoadControlLimitsVASVW(evEntity spineapi.EntityRemoteInterf
|
|||
return false
|
||||
}
|
||||
|
||||
// OSCEV requires recommendation limits to be available
|
||||
if _, err := c.uc.OscEV.LoadControlLimits(evEntity); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// on OSCEV all limits have to be active except they are set to the default value
|
||||
minLimits, _, _, err := c.uc.OscEV.CurrentLimits(evEntity)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue