Skip to content

Commit 82639c8

Browse files
authored
Merge pull request #2799 from ndrsnhs/Shelly-Pro3EM-inverter/-bat-fix
read currents from Pro3EM correctly
2 parents 14cf281 + 3f18921 commit 82639c8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/modules/devices/shelly/shelly/bat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def update(self) -> None:
6464
currents = [status['pm1:0']['current'], 0, 0]
6565
else:
6666
power = status['em:0']['total_act_power'] # shelly Pro3EM
67-
currents = [meter[f'{i}_current'] for i in 'abc']
67+
currents = [status['em:0'][f'{i}_current'] for i in 'abc']
6868

6969
power = power * self.factor
7070
imported, exported = self.sim_counter.sim_count(power)

packages/modules/devices/shelly/shelly/inverter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def update(self) -> None:
6262
currents = [status['pm1:0']['current'], 0, 0]
6363
else:
6464
power = status['em:0']['total_act_power'] # shelly Pro3EM
65-
currents = [meter[f'{i}_current'] for i in 'abc']
65+
currents = [status['em:0'][f'{i}_current'] for i in 'abc']
6666

6767
power = power * self.factor
6868
_, exported = self.sim_counter.sim_count(power)

0 commit comments

Comments
 (0)