Skip to content

Commit

Permalink
add sdm120 simcounter for openWB Kit
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrsnhs committed Dec 17, 2024
1 parent 66c6ee4 commit 3fabf51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/modules/devices/openwb/openwb_flex/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from modules.common.component_type import ComponentDescriptor
from modules.common.fault_state import ComponentInfo, FaultState
from modules.common.lovato import Lovato
from modules.common.sdm import Sdm120
from modules.common.sdm import Sdm630_72
from modules.common.simcount import SimCounter
from modules.common.store import get_bat_value_store
Expand Down Expand Up @@ -40,7 +41,7 @@ def update(self):
power = power * -1
else:
_, power = self.__client.get_power()
if isinstance(self.__client, Lovato):
if isinstance(self.__client, Lovato) or isinstance(self.__client, Sdm120):
imported, exported = self.sim_counter.sim_count(power)
else:
imported = self.__client.get_imported()
Expand Down
3 changes: 2 additions & 1 deletion packages/modules/devices/openwb/openwb_flex/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from modules.common.component_type import ComponentDescriptor
from modules.common.fault_state import ComponentInfo, FaultState
from modules.common.lovato import Lovato
from modules.common.sdm import Sdm120
from modules.common.simcount import SimCounter
from modules.common.store import get_inverter_value_store
from modules.devices.openwb.openwb_flex.config import PvKitFlexSetup
Expand Down Expand Up @@ -43,7 +44,7 @@ def update(self) -> None:
power = power*-1
currents = self.__client.get_currents()

if isinstance(self.__client, Lovato):
if isinstance(self.__client, Lovato) or isinstance(self.__client, Sdm120):
_, exported = self.sim_counter.sim_count(power)
else:
exported = self.__client.get_exported()
Expand Down

0 comments on commit 3fabf51

Please sign in to comment.