Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel committed Mar 5, 2025
1 parent 1e16ee5 commit 7106c8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/modules/devices/varta/varta/bat_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class KwargsDict(TypedDict):
device_id: int
device_address: str
ip_address: str


class VartaBatApi(AbstractBat):
Expand All @@ -24,7 +24,7 @@ def __init__(self, component_config: VartaBatApiSetup, **kwargs: Any) -> None:

def initialize(self) -> None:
self.__device_id: int = self.kwargs['device_id']
self.__device_address: str = self.kwargs['device_address']
self.ip_address: str = self.kwargs['ip_address']
self.sim_counter = SimCounter(self.__device_id, self.component_config.id, prefix="speicher")
self.store = get_bat_value_store(self.component_config.id)
self.fault_state = FaultState(ComponentInfo.from_component_config(self.component_config))
Expand All @@ -41,7 +41,7 @@ def get_xml_text(attribute_value: str) -> float:
# Wenn Speicher aus bzw. im Standby (keine Antwort), ersetze leeren Wert durch eine 0.
return 0

response = req.get_http_session().get('http://'+self.__device_address+'/cgi/ems_data.xml',
response = req.get_http_session().get('http://'+self.ip_address+'/cgi/ems_data.xml',
timeout=5)
response.encoding = 'utf-8'
response = response.text.replace("\n", "")
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/devices/victron/victron/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class KwargsDict(TypedDict):
device_id: int
tcp_client: modbus.ModbusTcpClient_
client: modbus.ModbusTcpClient_


class VictronInverter(AbstractInverter):
Expand All @@ -27,7 +27,7 @@ def __init__(self, component_config: VictronInverterSetup, **kwargs: Any) -> Non

def initialize(self) -> None:
self.__device_id: int = self.kwargs['device_id']
self.__tcp_client: modbus.ModbusTcpClient_ = self.kwargs['tcp_client']
self.__tcp_client: modbus.ModbusTcpClient_ = self.kwargs['client']
self.sim_counter = SimCounter(self.__device_id, self.component_config.id, prefix="pv")
self.store = get_inverter_value_store(self.component_config.id)
self.fault_state = FaultState(ComponentInfo.from_component_config(self.component_config))
Expand Down

0 comments on commit 7106c8d

Please sign in to comment.