From a7d56d1c3f3e839612bcb744a13566d3be047663 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Fri, 24 Sep 2021 14:18:14 -0400 Subject: [PATCH] Bump goalzero to 0.2.0 (#56613) * Bump goalzero to 0.1.8 * bump * recheck * bump --- homeassistant/components/goalzero/__init__.py | 3 +-- homeassistant/components/goalzero/config_flow.py | 5 +---- homeassistant/components/goalzero/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/goalzero/__init__.py b/homeassistant/components/goalzero/__init__.py index 04a9d6aaa86..7a179c46210 100644 --- a/homeassistant/components/goalzero/__init__.py +++ b/homeassistant/components/goalzero/__init__.py @@ -48,8 +48,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: name = entry.data[CONF_NAME] host = entry.data[CONF_HOST] - session = async_get_clientsession(hass) - api = Yeti(host, hass.loop, session) + api = Yeti(host, async_get_clientsession(hass)) try: await api.init_connect() except exceptions.ConnectError as ex: diff --git a/homeassistant/components/goalzero/config_flow.py b/homeassistant/components/goalzero/config_flow.py index cc2c4a9874f..f192c71cbf8 100644 --- a/homeassistant/components/goalzero/config_flow.py +++ b/homeassistant/components/goalzero/config_flow.py @@ -104,14 +104,11 @@ class GoalZeroFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): async def _async_try_connect(self, host: str) -> tuple[str | None, str | None]: """Try connecting to Goal Zero Yeti.""" try: - session = async_get_clientsession(self.hass) - api = Yeti(host, self.hass.loop, session) + api = Yeti(host, async_get_clientsession(self.hass)) await api.sysinfo() except exceptions.ConnectError: - _LOGGER.error("Error connecting to device at %s", host) return None, "cannot_connect" except exceptions.InvalidHost: - _LOGGER.error("Invalid host at %s", host) return None, "invalid_host" except Exception: # pylint: disable=broad-except _LOGGER.exception("Unexpected exception") diff --git a/homeassistant/components/goalzero/manifest.json b/homeassistant/components/goalzero/manifest.json index b4a9415d01d..b19cb884353 100644 --- a/homeassistant/components/goalzero/manifest.json +++ b/homeassistant/components/goalzero/manifest.json @@ -3,7 +3,7 @@ "name": "Goal Zero Yeti", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/goalzero", - "requirements": ["goalzero==0.1.7"], + "requirements": ["goalzero==0.2.0"], "dhcp": [ {"hostname": "yeti*"} ], diff --git a/requirements_all.txt b/requirements_all.txt index 08278e35679..e256bcdc41e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -718,7 +718,7 @@ glances_api==0.2.0 gntp==1.0.3 # homeassistant.components.goalzero -goalzero==0.1.7 +goalzero==0.2.0 # homeassistant.components.google google-api-python-client==1.6.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 66dc0116709..dc571668553 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -426,7 +426,7 @@ gios==2.0.0 glances_api==0.2.0 # homeassistant.components.goalzero -goalzero==0.1.7 +goalzero==0.2.0 # homeassistant.components.google google-api-python-client==1.6.4