From b1e8662f430f07b09b196c8f2cac938945e6063b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 20 Aug 2026 16:46:52 +0200 Subject: [PATCH] Bump hass-nabucasa from 2.2.0 to 2.3.0 (#179662) --- homeassistant/components/cloud/http_api.py | 4 ++++ homeassistant/components/cloud/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- pyproject.toml | 2 +- requirements.txt | 2 +- requirements_all.txt | 2 +- tests/components/cloud/test_http_api.py | 20 +++++++++++++++++++- 7 files changed, 28 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/cloud/http_api.py b/homeassistant/components/cloud/http_api.py index a962c1fb6853..eea633b7b5aa 100644 --- a/homeassistant/components/cloud/http_api.py +++ b/homeassistant/components/cloud/http_api.py @@ -79,6 +79,10 @@ _CLOUD_ERRORS: dict[ HTTPStatus.BAD_GATEWAY, "Unable to reach the Home Assistant Cloud.", ), + auth.AuthTimeoutError: ( + HTTPStatus.GATEWAY_TIMEOUT, + "Authentication timed out.", + ), aiohttp.ClientError: ( HTTPStatus.INTERNAL_SERVER_ERROR, "Error making internal request", diff --git a/homeassistant/components/cloud/manifest.json b/homeassistant/components/cloud/manifest.json index bd5f79524ac4..24a6452041e2 100644 --- a/homeassistant/components/cloud/manifest.json +++ b/homeassistant/components/cloud/manifest.json @@ -13,6 +13,6 @@ "integration_type": "system", "iot_class": "cloud_push", "loggers": ["acme", "hass_nabucasa", "snitun"], - "requirements": ["hass-nabucasa==2.2.0", "openai==2.45.0"], + "requirements": ["hass-nabucasa==2.3.0", "openai==2.45.0"], "single_config_entry": true } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index d015c15709a7..d5de9f1085a6 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -36,7 +36,7 @@ fnv-hash-fast==2.0.3 go2rtc-client==0.4.0 ha-ffmpeg==3.2.2 habluetooth==6.26.7 -hass-nabucasa==2.2.0 +hass-nabucasa==2.3.0 hassil==3.11.0 home-assistant-bluetooth==2.0.0 home-assistant-frontend==20260729.7 diff --git a/pyproject.toml b/pyproject.toml index fd9805928ba2..83c8c5041738 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dependencies = [ "fnv-hash-fast==2.0.3", # hass-nabucasa is imported by helpers which don't depend on the cloud # integration - "hass-nabucasa==2.2.0", + "hass-nabucasa==2.3.0", # When bumping httpx, please check the version pins of # httpcore, anyio, and h11 in gen_requirements_all "httpx==0.28.1", diff --git a/requirements.txt b/requirements.txt index 4b7543a0d007..4cf011f5edb7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ cronsim==2.7 cryptography==48.0.1 fnv-hash-fast==2.0.3 ha-ffmpeg==3.2.2 -hass-nabucasa==2.2.0 +hass-nabucasa==2.3.0 hassil==3.11.0 home-assistant-bluetooth==2.0.0 home-assistant-intents==2026.7.30 diff --git a/requirements_all.txt b/requirements_all.txt index 1f0fffd9c477..1d40a6aa651f 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1237,7 +1237,7 @@ hanna-cloud==0.0.7 harbor-python==1.5.0 # homeassistant.components.cloud -hass-nabucasa==2.2.0 +hass-nabucasa==2.3.0 # homeassistant.components.splunk hass-splunk==0.1.4 diff --git a/tests/components/cloud/test_http_api.py b/tests/components/cloud/test_http_api.py index 6d3d588027ae..94bead299507 100644 --- a/tests/components/cloud/test_http_api.py +++ b/tests/components/cloud/test_http_api.py @@ -10,7 +10,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, PropertyMock, patch import aiohttp from freezegun.api import FrozenDateTimeFactory -from hass_nabucasa import AlreadyConnectedError +from hass_nabucasa import AlreadyConnectedError, AuthTimeoutError from hass_nabucasa.auth import ( InvalidTotpCode, MFARequired, @@ -388,6 +388,24 @@ async def test_login_view_request_timeout( assert req.status == HTTPStatus.BAD_GATEWAY +async def test_login_view_request_auth_timeout( + cloud: MagicMock, + setup_cloud: None, + hass_client: ClientSessionGenerator, +) -> None: + """Test authentication timeout while trying to log in.""" + cloud_client = await hass_client() + cloud.login.side_effect = AuthTimeoutError + + req = await cloud_client.post( + "/api/cloud/login", json={"email": "my_username", "password": "my_password"} + ) + + assert cloud.login.call_args[1]["check_connection"] is False + + assert req.status == HTTPStatus.GATEWAY_TIMEOUT + + async def test_login_view_with_already_existing_connection( cloud: MagicMock, setup_cloud: None,