Bump growattServer to 1.1.0 (#56084)

This commit is contained in:
muppet3000 2021-09-15 09:08:15 +01:00 committed by GitHub
parent 0619069ae6
commit 19054e1ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ class GrowattServerConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
if not login_response["success"] and login_response["errCode"] == "102": if not login_response["success"] and login_response["errCode"] == "102":
return self._async_show_user_form({"base": "invalid_auth"}) return self._async_show_user_form({"base": "invalid_auth"})
self.user_id = login_response["userId"] self.user_id = login_response["user"]["id"]
self.data = user_input self.data = user_input
return await self.async_step_plant() return await self.async_step_plant()

View File

@ -3,7 +3,7 @@
"name": "Growatt", "name": "Growatt",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/growatt_server/", "documentation": "https://www.home-assistant.io/integrations/growatt_server/",
"requirements": ["growattServer==1.0.1"], "requirements": ["growattServer==1.1.0"],
"codeowners": ["@indykoning", "@muppet3000", "@JasperPlant"], "codeowners": ["@indykoning", "@muppet3000", "@JasperPlant"],
"iot_class": "cloud_polling" "iot_class": "cloud_polling"
} }

View File

@ -879,7 +879,7 @@ def get_device_list(api, config):
if not login_response["success"] and login_response["errCode"] == "102": if not login_response["success"] and login_response["errCode"] == "102":
_LOGGER.error("Username, Password or URL may be incorrect!") _LOGGER.error("Username, Password or URL may be incorrect!")
return return
user_id = login_response["userId"] user_id = login_response["user"]["id"]
if plant_id == DEFAULT_PLANT_ID: if plant_id == DEFAULT_PLANT_ID:
plant_info = api.plant_list(user_id) plant_info = api.plant_list(user_id)
plant_id = plant_info["data"][0]["plantId"] plant_id = plant_info["data"][0]["plantId"]

View File

@ -745,7 +745,7 @@ greeneye_monitor==2.1
greenwavereality==0.5.1 greenwavereality==0.5.1
# homeassistant.components.growatt_server # homeassistant.components.growatt_server
growattServer==1.0.1 growattServer==1.1.0
# homeassistant.components.gstreamer # homeassistant.components.gstreamer
gstreamer-player==1.1.2 gstreamer-player==1.1.2

View File

@ -432,7 +432,7 @@ googlemaps==2.5.1
greeclimate==0.11.8 greeclimate==0.11.8
# homeassistant.components.growatt_server # homeassistant.components.growatt_server
growattServer==1.0.1 growattServer==1.1.0
# homeassistant.components.profiler # homeassistant.components.profiler
guppy3==3.1.0 guppy3==3.1.0

View File

@ -40,7 +40,7 @@ GROWATT_PLANT_LIST_RESPONSE = {
}, },
"success": True, "success": True,
} }
GROWATT_LOGIN_RESPONSE = {"userId": 123456, "userLevel": 1, "success": True} GROWATT_LOGIN_RESPONSE = {"user": {"id": 123456}, "userLevel": 1, "success": True}
async def test_show_authenticate_form(hass): async def test_show_authenticate_form(hass):