Fix phase usage estimation from power (#2144)
Some checks failed
Default / Build UI (push) Failing after 2m8s
Default / Build (push) Failing after 15m4s
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Publish Github & APT release (push) Has been cancelled
Some checks failed
Default / Build UI (push) Failing after 2m8s
Default / Build (push) Failing after 15m4s
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Publish Github & APT release (push) Has been cancelled
This commit is contained in:
parent
7195103d1c
commit
f07b32da83
1 changed files with 1 additions and 1 deletions
|
|
@ -1190,7 +1190,7 @@ func (lp *LoadPoint) updateChargeCurrents() {
|
|||
// guess active phases from power consumption
|
||||
// assumes that chargePower has been updated before
|
||||
if lp.charging() && lp.chargeCurrent > 0 {
|
||||
phases := int(math.Round(lp.chargePower / Voltage / lp.chargeCurrent))
|
||||
phases := int(math.Ceil(lp.chargePower / Voltage / lp.chargeCurrent))
|
||||
if phases >= 1 && phases <= 3 {
|
||||
lp.activePhases = phases
|
||||
lp.log.DEBUG.Printf("detected phases: %dp (%.1fA @ %.0fW)", lp.activePhases, lp.chargeCurrent, lp.chargePower)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue