Bump Glances to 0.3.4 to fix async_timeout passing loop (#62090)

* Bump Glances to 0.3.2 to fix async_timeout passing loop

* Update requirements_all.txt

* Update requirements_test_all.txt

* Update config_flow.py

* Update __init__.py

* Update __init__.py

* Update strings.json

* Update config_flow.py

* Update config_flow.py

* Update __init__.py

* Update bg.json

* Remove `verify_ssl` translation

* Revert "Remove `verify_ssl` translation"

This reverts commit 906f9a01ea.

* Revert "Update bg.json"

This reverts commit 1d0e69351f.

* Update __init__.py

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update homeassistant/components/glances/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update __init__.py

* Update config_flow.py

* Update strings.json

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update to glances_api 0.3.4 - with httpx_client parameter

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
pull/64283/head
Guy Khmelnitsky 2022-01-17 10:32:54 +02:00 committed by GitHub
parent b92166e04c
commit 85c6a24665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -19,10 +19,10 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.httpx_client import get_async_client
from homeassistant.helpers.typing import ConfigType
from .const import (
@ -111,7 +111,7 @@ class GlancesData:
async def async_update(self):
"""Get the latest data from the Glances REST API."""
try:
await self.api.get_data()
await self.api.get_data("all")
self.available = True
except exceptions.GlancesApiError:
_LOGGER.error("Unable to fetch data from Glances")
@ -123,7 +123,7 @@ class GlancesData:
"""Set up the Glances client."""
try:
self.api = get_api(self.hass, self.config_entry.data)
await self.api.get_data()
await self.api.get_data("all")
self.available = True
_LOGGER.debug("Successfully connected to Glances")
@ -174,6 +174,6 @@ def get_api(hass, entry):
"""Return the api from glances_api."""
params = entry.copy()
params.pop(CONF_NAME)
verify_ssl = params.pop(CONF_VERIFY_SSL)
session = async_get_clientsession(hass, verify_ssl)
return Glances(hass.loop, session, **params)
verify_ssl = params.pop(CONF_VERIFY_SSL, True)
httpx_client = get_async_client(hass, verify_ssl=verify_ssl)
return Glances(httpx_client=httpx_client, **params)

View File

@ -47,7 +47,7 @@ async def validate_input(hass: core.HomeAssistant, data):
raise WrongVersion
try:
api = get_api(hass, data)
await api.get_data()
await api.get_data("all")
except glances_api.exceptions.GlancesApiConnectionError as err:
raise CannotConnect from err

View File

@ -3,7 +3,7 @@
"name": "Glances",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/glances",
"requirements": ["glances_api==0.2.0"],
"requirements": ["glances_api==0.3.4"],
"codeowners": ["@fabaff", "@engrbm87"],
"iot_class": "local_polling"
}

View File

@ -743,7 +743,7 @@ gios==2.1.0
gitterpy==0.1.7
# homeassistant.components.glances
glances_api==0.2.0
glances_api==0.3.4
# homeassistant.components.gntp
gntp==1.0.3

View File

@ -474,7 +474,7 @@ getmac==0.8.2
gios==2.1.0
# homeassistant.components.glances
glances_api==0.2.0
glances_api==0.3.4
# homeassistant.components.goalzero
goalzero==0.2.1