Skip to content

Commit

Permalink
Merge pull request #1133 from LKuemmel/changes_snaptec_repo
Browse files Browse the repository at this point in the history
Changes snaptec repo
  • Loading branch information
LKuemmel authored Sep 22, 2023
2 parents 5619a86 + ee3b14c commit 50b45c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/modules/devices/smart_me/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self,

def update(self, session: Session) -> None:
def parse_phase_values(key: str) -> List[float]:
return [response[key+str(i)] * 1000 for i in range(1, 4)]
return [response[key+str(i)] for i in range(1, 4)]

response = session.get('https://smart-me.com:443/api/Devices/' +
self.component_config.configuration.id, timeout=3).json()
Expand All @@ -33,6 +33,7 @@ def parse_phase_values(key: str) -> List[float]:
currents[0] = response["Current"]

powers = parse_phase_values("ActivePowerL")
powers = [powers[i] * 1000 for i in range(0, 3)]
if powers[0] == 0:
powers[0] = response["ActivePower"]

Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/solar_watt/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def request(url: str) -> Dict:
energy_manager_response = request('http://'+ip_address + '/rest/kiwigrid/wizard/devices')
else:
gateway_response = request('http://'+ip_address+':8080/')
for component in components.values():
for component in components:
if isinstance(component, SolarWattInverter):
if energy_manager_response is None:
energy_manager_response = request('http://'+ip_address + '/rest/kiwigrid/wizard/devices')
Expand Down

0 comments on commit 50b45c1

Please sign in to comment.