Skip to content

Commit

Permalink
Fix sungrow (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel authored Sep 26, 2024
1 parent 239cd9a commit 4cfaa1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/modules/devices/sungrow/sungrow/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ def create_inverter_component(component_config: SungrowInverterSetup):

def update_components(components: Iterable[Union[SungrowBat, SungrowCounter, SungrowInverter]]):
with client:
for component in components.values():
for component in components:
if isinstance(component, SungrowInverter):
with SingleComponentUpdateContext(component.fault_state):
pv_power = component.update()
for component in components.values():
for component in components:
if isinstance(component, SungrowCounter):
with SingleComponentUpdateContext(component.fault_state):
component.update(pv_power)
for component in components.values():
for component in components:
if isinstance(component, SungrowBat):
with SingleComponentUpdateContext(component.fault_state):
component.update()
Expand Down

0 comments on commit 4cfaa1c

Please sign in to comment.