diff --git a/E-Car/module.php b/E-Car/module.php index 2c84485..b20bcad 100644 --- a/E-Car/module.php +++ b/E-Car/module.php @@ -255,7 +255,12 @@ public function Update() break; case 2: if (!$this->ReadPropertyBoolean('SplitPhases')) { - $value = $this->GetValue('CurrentL12') * $volt * $this->GetValue('Phases'); + if ($this->ReadPropertyBoolean('Switching')) { + $value = $this->GetValue('CurrentL12') * $volt * $this->GetValue('Phases'); + } + else { + $value = $this->GetValue('CurrentL123') * $volt * 2; + } } elseif ($this->ReadPropertyBoolean('SplitPhases')) { $value += $this->GetValue('CurrentL1') * $volt; $value += $this->GetValue('CurrentL2') * $volt; @@ -263,7 +268,12 @@ public function Update() break; case 3: if (!$this->ReadPropertyBoolean('SplitPhases')) { - $value = $this->GetValue('CurrentL123') * $volt * $this->GetValue('Phases'); + if ($this->ReadPropertyBoolean('Switching')) { + $value = $this->GetValue('CurrentL123') * $volt * $this->GetValue('Phases'); + } + else { + $value = $this->GetValue('CurrentL123') * $volt * 3; + } } elseif ($this->ReadPropertyBoolean('SplitPhases')) { $value += $this->GetValue('CurrentL1') * $volt; $value += $this->GetValue('CurrentL2') * $volt;