Bump aioshelly to version 13.4.1 (#142477)

* Bymp aioshelly to 13.4.1

* Catch InvalidHostError

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Maciej Bieniek 2025-04-08 08:58:08 +02:00 committed by GitHub
parent 553091e95e
commit 480d645650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,7 @@ from aioshelly.exceptions import (
CustomPortNotSupported,
DeviceConnectionError,
InvalidAuthError,
InvalidHostError,
MacAddressMismatchError,
)
from aioshelly.rpc_device import RpcDevice
@ -157,6 +158,8 @@ class ShellyConfigFlow(ConfigFlow, domain=DOMAIN):
self.info = await self._async_get_info(host, port)
except DeviceConnectionError:
errors["base"] = "cannot_connect"
except InvalidHostError:
errors["base"] = "invalid_host"
except Exception: # noqa: BLE001
LOGGER.exception("Unexpected exception")
errors["base"] = "unknown"

View File

@ -8,7 +8,7 @@
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["aioshelly"],
"requirements": ["aioshelly==13.4.0"],
"requirements": ["aioshelly==13.4.1"],
"zeroconf": [
{
"type": "_http._tcp.local.",

View File

@ -51,6 +51,7 @@
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"invalid_host": "[%key:common::config_flow::error::invalid_host%]",
"unknown": "[%key:common::config_flow::error::unknown%]",
"firmware_not_fully_provisioned": "Device not fully provisioned. Please contact Shelly support",
"custom_port_not_supported": "Gen1 device does not support custom port.",

2
requirements_all.txt generated
View File

@ -371,7 +371,7 @@ aioruuvigateway==0.1.0
aiosenz==1.0.0
# homeassistant.components.shelly
aioshelly==13.4.0
aioshelly==13.4.1
# homeassistant.components.skybell
aioskybell==22.7.0

View File

@ -353,7 +353,7 @@ aioruuvigateway==0.1.0
aiosenz==1.0.0
# homeassistant.components.shelly
aioshelly==13.4.0
aioshelly==13.4.1
# homeassistant.components.skybell
aioskybell==22.7.0

View File

@ -11,6 +11,7 @@ from aioshelly.exceptions import (
CustomPortNotSupported,
DeviceConnectionError,
InvalidAuthError,
InvalidHostError,
)
import pytest
@ -308,6 +309,7 @@ async def test_form_auth(
("exc", "base_error"),
[
(DeviceConnectionError, "cannot_connect"),
(InvalidHostError, "invalid_host"),
(ValueError, "unknown"),
],
)