mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 05:06:13 +01:00
Bump aioamazondevices to 9.0.2 (#156963)
This commit is contained in:
@@ -45,7 +45,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
|
||||
data[CONF_PASSWORD],
|
||||
)
|
||||
|
||||
return await api.login_mode_interactive(data[CONF_CODE])
|
||||
return await api.login.login_mode_interactive(data[CONF_CODE])
|
||||
|
||||
|
||||
class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
@@ -59,7 +59,7 @@ class AmazonDevicesCoordinator(DataUpdateCoordinator[dict[str, AmazonDevice]]):
|
||||
async def _async_update_data(self) -> dict[str, AmazonDevice]:
|
||||
"""Update device data."""
|
||||
try:
|
||||
await self.api.login_mode_stored_data()
|
||||
await self.api.login.login_mode_stored_data()
|
||||
data = await self.api.get_devices_data()
|
||||
except CannotConnect as err:
|
||||
raise UpdateFailed(
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["aioamazondevices"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["aioamazondevices==8.0.1"]
|
||||
"requirements": ["aioamazondevices==9.0.2"]
|
||||
}
|
||||
|
||||
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@@ -190,7 +190,7 @@ aioairzone-cloud==0.7.2
|
||||
aioairzone==1.0.2
|
||||
|
||||
# homeassistant.components.alexa_devices
|
||||
aioamazondevices==8.0.1
|
||||
aioamazondevices==9.0.2
|
||||
|
||||
# homeassistant.components.ambient_network
|
||||
# homeassistant.components.ambient_station
|
||||
|
||||
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@@ -178,7 +178,7 @@ aioairzone-cloud==0.7.2
|
||||
aioairzone==1.0.2
|
||||
|
||||
# homeassistant.components.alexa_devices
|
||||
aioamazondevices==8.0.1
|
||||
aioamazondevices==9.0.2
|
||||
|
||||
# homeassistant.components.ambient_network
|
||||
# homeassistant.components.ambient_station
|
||||
|
||||
@@ -43,7 +43,8 @@ def mock_amazon_devices_client() -> Generator[AsyncMock]:
|
||||
),
|
||||
):
|
||||
client = mock_client.return_value
|
||||
client.login_mode_interactive.return_value = {
|
||||
client.login = AsyncMock()
|
||||
client.login.login_mode_interactive.return_value = {
|
||||
"customer_info": {"user_id": TEST_USERNAME},
|
||||
CONF_SITE: "https://www.amazon.com",
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@ async def test_full_flow(
|
||||
},
|
||||
}
|
||||
assert result["result"].unique_id == TEST_USERNAME
|
||||
mock_amazon_devices_client.login_mode_interactive.assert_called_once_with("023123")
|
||||
mock_amazon_devices_client.login.login_mode_interactive.assert_called_once_with(
|
||||
"023123"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -75,7 +77,7 @@ async def test_flow_errors(
|
||||
error: str,
|
||||
) -> None:
|
||||
"""Test flow errors."""
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = exception
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = exception
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
@@ -97,7 +99,7 @@ async def test_flow_errors(
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["errors"] == {"base": error}
|
||||
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = None
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = None
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@@ -196,7 +198,7 @@ async def test_reauth_not_successful(
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = side_effect
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = side_effect
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
@@ -209,7 +211,7 @@ async def test_reauth_not_successful(
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
assert result["errors"] == {"base": error}
|
||||
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = None
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = None
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@@ -295,7 +297,7 @@ async def test_reconfigure_fails(
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "reconfigure"
|
||||
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = side_effect
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = side_effect
|
||||
|
||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@@ -309,7 +311,7 @@ async def test_reconfigure_fails(
|
||||
assert reconfigure_result["step_id"] == "reconfigure"
|
||||
assert reconfigure_result["errors"] == {"base": error}
|
||||
|
||||
mock_amazon_devices_client.login_mode_interactive.side_effect = None
|
||||
mock_amazon_devices_client.login.login_mode_interactive.side_effect = None
|
||||
|
||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
|
||||
Reference in New Issue
Block a user