Bump hass-nabucasa from 0.89.0 to 0.90.0 (#138387)

* Bump hass-nabucasa from 0.89.0 to 0.90.0

* Use new shiny enum
This commit is contained in:
Erik Montnemery 2025-02-12 15:29:42 +01:00 committed by GitHub
parent 910711ecba
commit 281c2bfb7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 12 deletions

View File

@ -8,12 +8,13 @@ from collections.abc import AsyncIterator, Callable, Coroutine, Mapping
import hashlib
import logging
import random
from typing import Any, Literal
from typing import Any
from aiohttp import ClientError
from hass_nabucasa import Cloud, CloudError
from hass_nabucasa.api import CloudApiNonRetryableError
from hass_nabucasa.cloud_api import async_files_delete_file, async_files_list
from hass_nabucasa.files import StorageType
from homeassistant.components.backup import AgentBackup, BackupAgent, BackupAgentError
from homeassistant.core import HomeAssistant, callback
@ -24,7 +25,6 @@ from .client import CloudClient
from .const import DATA_CLOUD, DOMAIN, EVENT_CLOUD_EVENT
_LOGGER = logging.getLogger(__name__)
_STORAGE_BACKUP: Literal["backup"] = "backup"
_RETRY_LIMIT = 5
_RETRY_SECONDS_MIN = 60
_RETRY_SECONDS_MAX = 600
@ -106,7 +106,7 @@ class CloudBackupAgent(BackupAgent):
try:
content = await self._cloud.files.download(
storage_type=_STORAGE_BACKUP,
storage_type=StorageType.BACKUP,
filename=self._get_backup_filename(),
)
except CloudError as err:
@ -138,7 +138,7 @@ class CloudBackupAgent(BackupAgent):
while tries <= _RETRY_LIMIT:
try:
await self._cloud.files.upload(
storage_type=_STORAGE_BACKUP,
storage_type=StorageType.BACKUP,
open_stream=open_stream,
filename=filename,
base64md5hash=base64md5hash,
@ -185,7 +185,7 @@ class CloudBackupAgent(BackupAgent):
try:
await async_files_delete_file(
self._cloud,
storage_type=_STORAGE_BACKUP,
storage_type=StorageType.BACKUP,
filename=self._get_backup_filename(),
)
except (ClientError, CloudError) as err:
@ -194,7 +194,9 @@ class CloudBackupAgent(BackupAgent):
async def async_list_backups(self, **kwargs: Any) -> list[AgentBackup]:
"""List backups."""
try:
backups = await async_files_list(self._cloud, storage_type=_STORAGE_BACKUP)
backups = await async_files_list(
self._cloud, storage_type=StorageType.BACKUP
)
_LOGGER.debug("Cloud backups: %s", backups)
except (ClientError, CloudError) as err:
raise BackupAgentError("Failed to list backups") from err

View File

@ -13,6 +13,6 @@
"integration_type": "system",
"iot_class": "cloud_push",
"loggers": ["acme", "hass_nabucasa", "snitun"],
"requirements": ["hass-nabucasa==0.89.0"],
"requirements": ["hass-nabucasa==0.90.0"],
"single_config_entry": true
}

View File

@ -34,7 +34,7 @@ fnv-hash-fast==1.2.2
go2rtc-client==0.1.2
ha-ffmpeg==3.2.2
habluetooth==3.21.1
hass-nabucasa==0.89.0
hass-nabucasa==0.90.0
hassil==2.2.3
home-assistant-bluetooth==1.13.1
home-assistant-frontend==20250210.0

View File

@ -46,7 +46,7 @@ dependencies = [
"fnv-hash-fast==1.2.2",
# hass-nabucasa is imported by helpers which don't depend on the cloud
# integration
"hass-nabucasa==0.89.0",
"hass-nabucasa==0.90.0",
# When bumping httpx, please check the version pins of
# httpcore, anyio, and h11 in gen_requirements_all
"httpx==0.28.1",

2
requirements.txt generated
View File

@ -21,7 +21,7 @@ certifi>=2021.5.30
ciso8601==2.3.2
cronsim==2.6
fnv-hash-fast==1.2.2
hass-nabucasa==0.89.0
hass-nabucasa==0.90.0
httpx==0.28.1
home-assistant-bluetooth==1.13.1
ifaddr==0.2.0

2
requirements_all.txt generated
View File

@ -1106,7 +1106,7 @@ habiticalib==0.3.7
habluetooth==3.21.1
# homeassistant.components.cloud
hass-nabucasa==0.89.0
hass-nabucasa==0.90.0
# homeassistant.components.splunk
hass-splunk==0.1.1

View File

@ -947,7 +947,7 @@ habiticalib==0.3.7
habluetooth==3.21.1
# homeassistant.components.cloud
hass-nabucasa==0.89.0
hass-nabucasa==0.90.0
# homeassistant.components.conversation
hassil==2.2.3