Revert "Easee: clear stale live measurements on cloud disconnect" (#28287)

This commit is contained in:
Ingo 2026-03-16 22:40:42 +01:00 • committed by GitHub
parent 0211046343
commit b5fefcc1d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,8 +40,6 @@ import (
"golang.org/x/oauth2"
)
const obsTimeout = 5 * time.Minute
// Easee charger implementation
type Easee struct {
*request.Helper
@ -751,10 +749,6 @@ func (c *Easee) CurrentPower() (float64, error) {
c.mux.RLock()
defer c.mux.RUnlock()
if t, ok := c.obsTime[easee.TOTAL_POWER]; ok && time.Since(t) > obsTimeout {
return 0, nil
}
return c.currentPower, nil
}
@ -773,11 +767,6 @@ var _ api.PhaseCurrents = (*Easee)(nil)
func (c *Easee) Currents() (float64, float64, float64, error) {
c.mux.RLock()
defer c.mux.RUnlock()
if t, ok := c.obsTime[easee.IN_CURRENT_T3]; ok && time.Since(t) > obsTimeout {
return 0, 0, 0, nil
}
return c.currentL1, c.currentL2, c.currentL3, nil
}