mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Bump aioshelly to 4.1.0 (#80795)
This commit is contained in:
parent
4837e22262
commit
8fa64a7a89
@ -8,7 +8,7 @@ from typing import Any, cast
|
|||||||
|
|
||||||
import aioshelly
|
import aioshelly
|
||||||
from aioshelly.block_device import BlockDevice
|
from aioshelly.block_device import BlockDevice
|
||||||
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError
|
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
|
||||||
from aioshelly.rpc_device import RpcDevice
|
from aioshelly.rpc_device import RpcDevice
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -510,7 +510,11 @@ class ShellyRpcCoordinator(DataUpdateCoordinator):
|
|||||||
try:
|
try:
|
||||||
await self.device.trigger_ota_update(beta=beta)
|
await self.device.trigger_ota_update(beta=beta)
|
||||||
except DeviceConnectionError as err:
|
except DeviceConnectionError as err:
|
||||||
raise HomeAssistantError(f"Error starting OTA update: {repr(err)}") from err
|
raise HomeAssistantError(
|
||||||
|
f"OTA update connection error: {repr(err)}"
|
||||||
|
) from err
|
||||||
|
except RpcCallError as err:
|
||||||
|
raise HomeAssistantError(f"OTA update request error: {repr(err)}") from err
|
||||||
except InvalidAuthError:
|
except InvalidAuthError:
|
||||||
self.entry.async_start_reauth(self.hass)
|
self.entry.async_start_reauth(self.hass)
|
||||||
else:
|
else:
|
||||||
@ -553,7 +557,7 @@ class ShellyRpcPollingCoordinator(DataUpdateCoordinator):
|
|||||||
LOGGER.debug("Polling Shelly RPC Device - %s", self.name)
|
LOGGER.debug("Polling Shelly RPC Device - %s", self.name)
|
||||||
try:
|
try:
|
||||||
await self.device.update_status()
|
await self.device.update_status()
|
||||||
except DeviceConnectionError as err:
|
except (DeviceConnectionError, RpcCallError) as err:
|
||||||
raise UpdateFailed(f"Device disconnected: {repr(err)}") from err
|
raise UpdateFailed(f"Device disconnected: {repr(err)}") from err
|
||||||
except InvalidAuthError:
|
except InvalidAuthError:
|
||||||
self.entry.async_start_reauth(self.hass)
|
self.entry.async_start_reauth(self.hass)
|
||||||
|
@ -6,7 +6,7 @@ from dataclasses import dataclass
|
|||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
from aioshelly.block_device import Block
|
from aioshelly.block_device import Block
|
||||||
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError
|
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -426,7 +426,11 @@ class ShellyRpcEntity(entity.Entity):
|
|||||||
except DeviceConnectionError as err:
|
except DeviceConnectionError as err:
|
||||||
self.coordinator.last_update_success = False
|
self.coordinator.last_update_success = False
|
||||||
raise HomeAssistantError(
|
raise HomeAssistantError(
|
||||||
f"Call RPC for entity {self.name} failed, method: {method}, params: {params}, error: {repr(err)}"
|
f"Call RPC for {self.name} connection error, method: {method}, params: {params}, error: {repr(err)}"
|
||||||
|
) from err
|
||||||
|
except RpcCallError as err:
|
||||||
|
raise HomeAssistantError(
|
||||||
|
f"Call RPC for {self.name} request error, method: {method}, params: {params}, error: {repr(err)}"
|
||||||
) from err
|
) from err
|
||||||
except InvalidAuthError:
|
except InvalidAuthError:
|
||||||
self.coordinator.entry.async_start_reauth(self.hass)
|
self.coordinator.entry.async_start_reauth(self.hass)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Shelly",
|
"name": "Shelly",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/shelly",
|
"documentation": "https://www.home-assistant.io/integrations/shelly",
|
||||||
"requirements": ["aioshelly==4.0.0"],
|
"requirements": ["aioshelly==4.1.0"],
|
||||||
"dependencies": ["http"],
|
"dependencies": ["http"],
|
||||||
"zeroconf": [
|
"zeroconf": [
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ aiosenseme==0.6.1
|
|||||||
aiosenz==1.0.0
|
aiosenz==1.0.0
|
||||||
|
|
||||||
# homeassistant.components.shelly
|
# homeassistant.components.shelly
|
||||||
aioshelly==4.0.0
|
aioshelly==4.1.0
|
||||||
|
|
||||||
# homeassistant.components.skybell
|
# homeassistant.components.skybell
|
||||||
aioskybell==22.7.0
|
aioskybell==22.7.0
|
||||||
|
@ -230,7 +230,7 @@ aiosenseme==0.6.1
|
|||||||
aiosenz==1.0.0
|
aiosenz==1.0.0
|
||||||
|
|
||||||
# homeassistant.components.shelly
|
# homeassistant.components.shelly
|
||||||
aioshelly==4.0.0
|
aioshelly==4.1.0
|
||||||
|
|
||||||
# homeassistant.components.skybell
|
# homeassistant.components.skybell
|
||||||
aioskybell==22.7.0
|
aioskybell==22.7.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user