Skip to content

Commit

Permalink
Merge pull request #11 from Sjord/get-all-device-list
Browse files Browse the repository at this point in the history
Call getAllDeviceList, to get info about multiple inverters
  • Loading branch information
Sjord committed Apr 12, 2020
2 parents e4b9b9a + c72154c commit 4f988f1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions growatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ def get_user_center_energy_data(self):
)
return response.json()

def get_all_device_list(self, plant_id):
"""
Get information on each device/inverter.
"""
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 4f988f1

Please sign in to comment.