EEBus: return not available when disconnected (#15580)
This commit is contained in:
parent
81f3a1cc46
commit
de80adbb5b
1 changed files with 2 additions and 2 deletions
|
|
@ -581,11 +581,11 @@ func (c *EEBus) Identify() (string, error) {
|
|||
|
||||
var _ api.Battery = (*EEBus)(nil)
|
||||
|
||||
// Soc implements the api.Vehicle interface
|
||||
// Soc implements the api.Battery interface
|
||||
func (c *EEBus) Soc() (float64, error) {
|
||||
evEntity, ok := c.isEvConnected()
|
||||
if !ok {
|
||||
return 0, nil
|
||||
return 0, api.ErrNotAvailable
|
||||
}
|
||||
|
||||
if !c.uc.EvSoc.IsScenarioAvailableAtEntity(evEntity, 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue