Easee: adjust logic for opmode consistency (#11973)
Some checks failed
Some checks failed
This commit is contained in:
parent
9ebdfc331e
commit
3d2549705c
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue