Skip to content

Commit

Permalink
Easee: adjust logic for opmode consistency (#11973)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimmiMeloni authored Jan 31, 2024
1 parent 9ebdfc3 commit 3d25497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charger/easee.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ func (c *Easee) confirmStatusConsistency() {
powerFlowing := c.currentPower > 0
c.mux.Unlock()

if opCharging != powerFlowing || opCharging != pilotCharging {
if (!opCharging && powerFlowing) || opCharging != pilotCharging {
// poll opMode from charger as API can give outdated data after SignalR (re)connect
if time.Since(c.lastOpModePollTriggered) > time.Minute*3 { // api rate limit, max once in 3 minutes
uri := fmt.Sprintf("%s/chargers/%s/commands/poll_chargeropmode", easee.API, c.charger)
Expand Down

0 comments on commit 3d25497

Please sign in to comment.