SGReady: reset session energy when status off (#22014)

This commit is contained in:
andig 2025-06-24 12:04:26 +02:00 • committed by GitHub
parent 26cd971fb0
commit 2cad067baf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,6 +129,10 @@ func (wb *SgReady) getMode() (int64, error) {
// Status implements the api.Charger interface
func (wb *SgReady) Status() (api.ChargeStatus, error) {
if wb.lp != nil && wb.lp.GetMode() == api.ModeOff {
return api.StatusA, nil
}
mode, err := wb.getMode()
if err != nil {
return api.StatusNone, err