mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Bump pyoverkiz to 2.2.2 (#185861)
This commit is contained in:
@@ -25,6 +25,7 @@ from pyoverkiz.exceptions import (
|
||||
MaintenanceError,
|
||||
NoSuchTokenError,
|
||||
NotAuthenticatedError,
|
||||
ServiceUnavailableError,
|
||||
TooManyAttemptsBannedError,
|
||||
TooManyRequestsError,
|
||||
UnknownUserError,
|
||||
@@ -169,7 +170,12 @@ class OverkizConfigFlow(
|
||||
data_schema=probatio.Schema(
|
||||
{
|
||||
probatio.Required(CONF_HUB, default=self._server): probatio.In(
|
||||
{key: hub.name for key, hub in SUPPORTED_SERVERS.items()}
|
||||
{
|
||||
key: hub.name
|
||||
for key, hub in SUPPORTED_SERVERS.items()
|
||||
# Needs multi-account site selection, not supported yet
|
||||
if key != Server.SOMFY
|
||||
}
|
||||
),
|
||||
}
|
||||
),
|
||||
@@ -248,10 +254,10 @@ class OverkizConfigFlow(
|
||||
errors["base"] = "unsupported_hardware"
|
||||
else:
|
||||
errors["base"] = "invalid_auth"
|
||||
except TimeoutError, ClientError:
|
||||
errors["base"] = "cannot_connect"
|
||||
except MaintenanceError:
|
||||
errors["base"] = "server_in_maintenance"
|
||||
except TimeoutError, ClientError, ServiceUnavailableError:
|
||||
errors["base"] = "cannot_connect"
|
||||
except TooManyAttemptsBannedError:
|
||||
errors["base"] = "too_many_attempts"
|
||||
except UnknownUserError:
|
||||
@@ -325,11 +331,11 @@ class OverkizConfigFlow(
|
||||
except ClientConnectorCertificateError as exception:
|
||||
errors["base"] = "certificate_verify_failed"
|
||||
LOGGER.debug(exception)
|
||||
except (TimeoutError, ClientError) as exception:
|
||||
errors["base"] = "cannot_connect"
|
||||
LOGGER.debug(exception)
|
||||
except MaintenanceError:
|
||||
errors["base"] = "server_in_maintenance"
|
||||
except (TimeoutError, ClientError, ServiceUnavailableError) as exception:
|
||||
errors["base"] = "cannot_connect"
|
||||
LOGGER.debug(exception)
|
||||
except TooManyAttemptsBannedError:
|
||||
errors["base"] = "too_many_attempts"
|
||||
except UnknownUserError:
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"integration_type": "hub",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["boto3", "botocore", "pyoverkiz", "s3transfer"],
|
||||
"requirements": ["pyoverkiz[nexity]==2.1.2"],
|
||||
"requirements": ["pyoverkiz[nexity]==2.2.2"],
|
||||
"zeroconf": [
|
||||
{
|
||||
"name": "gateway*",
|
||||
|
||||
Generated
+1
-1
@@ -2508,7 +2508,7 @@ pyotgw==2.2.3
|
||||
pyotp==2.10.0
|
||||
|
||||
# homeassistant.components.overkiz
|
||||
pyoverkiz[nexity]==2.1.2
|
||||
pyoverkiz[nexity]==2.2.2
|
||||
|
||||
# homeassistant.components.palazzetti
|
||||
pypalazzetti==0.1.20
|
||||
|
||||
@@ -18,6 +18,7 @@ from pyoverkiz.exceptions import (
|
||||
BadCredentialsError,
|
||||
MaintenanceError,
|
||||
NoSuchTokenError,
|
||||
ServiceUnavailableError,
|
||||
TooManyAttemptsBannedError,
|
||||
TooManyRequestsError,
|
||||
UnknownUserError,
|
||||
@@ -31,7 +32,7 @@ from homeassistant.components.application_credentials import (
|
||||
)
|
||||
from homeassistant.components.overkiz.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
from homeassistant.data_entry_flow import FlowResultType, InvalidData
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
|
||||
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo
|
||||
@@ -148,6 +149,19 @@ async def test_form_cloud(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> N
|
||||
assert len(mock_setup_entry.mock_calls) == 1
|
||||
|
||||
|
||||
async def test_form_somfy_multi_account_hidden(hass: HomeAssistant) -> None:
|
||||
"""Test the experimental Somfy multi-account server cannot be selected."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
with pytest.raises(InvalidData):
|
||||
await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{"hub": "somfy"},
|
||||
)
|
||||
|
||||
|
||||
async def test_form_only_cloud_supported(
|
||||
hass: HomeAssistant, mock_setup_entry: AsyncMock
|
||||
) -> None:
|
||||
@@ -249,6 +263,7 @@ async def test_form_local_happy_flow(
|
||||
(TimeoutError, "cannot_connect"),
|
||||
(ClientError, "cannot_connect"),
|
||||
(MaintenanceError, "server_in_maintenance"),
|
||||
(ServiceUnavailableError, "cannot_connect"),
|
||||
(TooManyAttemptsBannedError, "too_many_attempts"),
|
||||
(UnknownUserError, "unsupported_hardware"),
|
||||
(ApplicationNotAllowedError, "application_not_allowed"),
|
||||
@@ -425,6 +440,7 @@ async def test_form_invalid_hardware_cloud_local(
|
||||
(TimeoutError, "cannot_connect"),
|
||||
(ClientError, "cannot_connect"),
|
||||
(MaintenanceError, "server_in_maintenance"),
|
||||
(ServiceUnavailableError, "cannot_connect"),
|
||||
(TooManyAttemptsBannedError, "too_many_attempts"),
|
||||
(UnknownUserError, "unsupported_hardware"),
|
||||
(NoSuchTokenError, "invalid_auth"),
|
||||
|
||||
Reference in New Issue
Block a user