Bump pyairvisual to 5.0.9 (#53578)
This commit is contained in:
parent
5a6be2370b
commit
e04b2c2e35
4 changed files with 6 additions and 8 deletions
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
from collections.abc import Mapping
|
||||
from datetime import timedelta
|
||||
from math import ceil
|
||||
from typing import Any, Dict, cast
|
||||
from typing import Any
|
||||
|
||||
from pyairvisual import CloudAPI, NodeSamba
|
||||
from pyairvisual.errors import (
|
||||
|
@ -216,8 +216,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
)
|
||||
|
||||
try:
|
||||
data = await api_coro
|
||||
return cast(Dict[str, Any], data)
|
||||
return await api_coro
|
||||
except (InvalidKeyError, KeyExpiredError) as ex:
|
||||
raise ConfigEntryAuthFailed from ex
|
||||
except AirVisualError as err:
|
||||
|
@ -261,8 +260,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
async with NodeSamba(
|
||||
config_entry.data[CONF_IP_ADDRESS], config_entry.data[CONF_PASSWORD]
|
||||
) as node:
|
||||
data = await node.async_get_latest_measurements()
|
||||
return cast(Dict[str, Any], data)
|
||||
return await node.async_get_latest_measurements()
|
||||
except NodeProError as err:
|
||||
raise UpdateFailed(f"Error while retrieving data: {err}") from err
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "AirVisual",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/airvisual",
|
||||
"requirements": ["pyairvisual==5.0.8"],
|
||||
"requirements": ["pyairvisual==5.0.9"],
|
||||
"codeowners": ["@bachya"],
|
||||
"iot_class": "cloud_polling"
|
||||
}
|
||||
|
|
|
@ -1311,7 +1311,7 @@ pyaftership==0.1.2
|
|||
pyairnow==1.1.0
|
||||
|
||||
# homeassistant.components.airvisual
|
||||
pyairvisual==5.0.8
|
||||
pyairvisual==5.0.9
|
||||
|
||||
# homeassistant.components.almond
|
||||
pyalmond==0.0.2
|
||||
|
|
|
@ -742,7 +742,7 @@ pyaehw4a1==0.3.9
|
|||
pyairnow==1.1.0
|
||||
|
||||
# homeassistant.components.airvisual
|
||||
pyairvisual==5.0.8
|
||||
pyairvisual==5.0.9
|
||||
|
||||
# homeassistant.components.almond
|
||||
pyalmond==0.0.2
|
||||
|
|
Loading…
Add table
Reference in a new issue