Skip to content

Commit

Permalink
Call getAllDeviceList, to get info about multiple inverters
Browse files Browse the repository at this point in the history
Related to #10
  • Loading branch information
Sjord committed Apr 2, 2020
1 parent e4b9b9a commit 52974b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions growatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ def get_user_center_energy_data(self):
)
return response.json()

def get_all_device_list(self, plant_id):
response = self.session.post(
self.get_url("newTwoPlantAPI.do"),
params={
"op": "getAllDeviceList",
"plantId": plant_id
}
)
return response.json()

def logout(self):
self.session.get(self.get_url("logout.do"))
self.logged_in = False
Expand Down

0 comments on commit 52974b1

Please sign in to comment.