Revert "Fix phase usage estimation from power"
This reverts commit 60760cad618cf653d159b56603a7bd9e52fcaeb5.
This commit is contained in:
parent
fb1d6f552f
commit
13dac30def
1 changed files with 1 additions and 1 deletions
|
|
@ -1199,7 +1199,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.Ceil(lp.chargePower / Voltage / lp.chargeCurrent))
|
||||
phases := int(math.Round(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