mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
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 906f9a01eaf9e8d229b7d977392875c00420d253. * Revert "Update bg.json" This reverts commit 1d0e69351fac0b96a1aa5da3e3ecc2153863c25a. * 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>
This commit is contained in:
parent
b92166e04c
commit
85c6a24665
@ -19,10 +19,10 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
from homeassistant.helpers.event import async_track_time_interval
|
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 homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
@ -111,7 +111,7 @@ class GlancesData:
|
|||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Get the latest data from the Glances REST API."""
|
"""Get the latest data from the Glances REST API."""
|
||||||
try:
|
try:
|
||||||
await self.api.get_data()
|
await self.api.get_data("all")
|
||||||
self.available = True
|
self.available = True
|
||||||
except exceptions.GlancesApiError:
|
except exceptions.GlancesApiError:
|
||||||
_LOGGER.error("Unable to fetch data from Glances")
|
_LOGGER.error("Unable to fetch data from Glances")
|
||||||
@ -123,7 +123,7 @@ class GlancesData:
|
|||||||
"""Set up the Glances client."""
|
"""Set up the Glances client."""
|
||||||
try:
|
try:
|
||||||
self.api = get_api(self.hass, self.config_entry.data)
|
self.api = get_api(self.hass, self.config_entry.data)
|
||||||
await self.api.get_data()
|
await self.api.get_data("all")
|
||||||
self.available = True
|
self.available = True
|
||||||
_LOGGER.debug("Successfully connected to Glances")
|
_LOGGER.debug("Successfully connected to Glances")
|
||||||
|
|
||||||
@ -174,6 +174,6 @@ def get_api(hass, entry):
|
|||||||
"""Return the api from glances_api."""
|
"""Return the api from glances_api."""
|
||||||
params = entry.copy()
|
params = entry.copy()
|
||||||
params.pop(CONF_NAME)
|
params.pop(CONF_NAME)
|
||||||
verify_ssl = params.pop(CONF_VERIFY_SSL)
|
verify_ssl = params.pop(CONF_VERIFY_SSL, True)
|
||||||
session = async_get_clientsession(hass, verify_ssl)
|
httpx_client = get_async_client(hass, verify_ssl=verify_ssl)
|
||||||
return Glances(hass.loop, session, **params)
|
return Glances(httpx_client=httpx_client, **params)
|
||||||
|
@ -47,7 +47,7 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||||||
raise WrongVersion
|
raise WrongVersion
|
||||||
try:
|
try:
|
||||||
api = get_api(hass, data)
|
api = get_api(hass, data)
|
||||||
await api.get_data()
|
await api.get_data("all")
|
||||||
except glances_api.exceptions.GlancesApiConnectionError as err:
|
except glances_api.exceptions.GlancesApiConnectionError as err:
|
||||||
raise CannotConnect from err
|
raise CannotConnect from err
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Glances",
|
"name": "Glances",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/glances",
|
"documentation": "https://www.home-assistant.io/integrations/glances",
|
||||||
"requirements": ["glances_api==0.2.0"],
|
"requirements": ["glances_api==0.3.4"],
|
||||||
"codeowners": ["@fabaff", "@engrbm87"],
|
"codeowners": ["@fabaff", "@engrbm87"],
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
}
|
}
|
||||||
|
@ -743,7 +743,7 @@ gios==2.1.0
|
|||||||
gitterpy==0.1.7
|
gitterpy==0.1.7
|
||||||
|
|
||||||
# homeassistant.components.glances
|
# homeassistant.components.glances
|
||||||
glances_api==0.2.0
|
glances_api==0.3.4
|
||||||
|
|
||||||
# homeassistant.components.gntp
|
# homeassistant.components.gntp
|
||||||
gntp==1.0.3
|
gntp==1.0.3
|
||||||
|
@ -474,7 +474,7 @@ getmac==0.8.2
|
|||||||
gios==2.1.0
|
gios==2.1.0
|
||||||
|
|
||||||
# homeassistant.components.glances
|
# homeassistant.components.glances
|
||||||
glances_api==0.2.0
|
glances_api==0.3.4
|
||||||
|
|
||||||
# homeassistant.components.goalzero
|
# homeassistant.components.goalzero
|
||||||
goalzero==0.2.1
|
goalzero==0.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user