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 Franck Nijhof
parent 0faa8efd5a
commit a9c6a06704
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
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 hashlib
import logging import logging
import random import random
from typing import Any, Literal from typing import Any
from aiohttp import ClientError from aiohttp import ClientError
from hass_nabucasa import Cloud, CloudError from hass_nabucasa import Cloud, CloudError
from hass_nabucasa.api import CloudApiNonRetryableError from hass_nabucasa.api import CloudApiNonRetryableError
from hass_nabucasa.cloud_api import async_files_delete_file, async_files_list 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.components.backup import AgentBackup, BackupAgent, BackupAgentError
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
@ -24,7 +25,6 @@ from .client import CloudClient
from .const import DATA_CLOUD, DOMAIN, EVENT_CLOUD_EVENT from .const import DATA_CLOUD, DOMAIN, EVENT_CLOUD_EVENT
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
_STORAGE_BACKUP: Literal["backup"] = "backup"
_RETRY_LIMIT = 5 _RETRY_LIMIT = 5
_RETRY_SECONDS_MIN = 60 _RETRY_SECONDS_MIN = 60
_RETRY_SECONDS_MAX = 600 _RETRY_SECONDS_MAX = 600
@ -106,7 +106,7 @@ class CloudBackupAgent(BackupAgent):
try: try:
content = await self._cloud.files.download( content = await self._cloud.files.download(
storage_type=_STORAGE_BACKUP, storage_type=StorageType.BACKUP,
filename=self._get_backup_filename(), filename=self._get_backup_filename(),
) )
except CloudError as err: except CloudError as err:
@ -138,7 +138,7 @@ class CloudBackupAgent(BackupAgent):
while tries <= _RETRY_LIMIT: while tries <= _RETRY_LIMIT:
try: try:
await self._cloud.files.upload( await self._cloud.files.upload(
storage_type=_STORAGE_BACKUP, storage_type=StorageType.BACKUP,
open_stream=open_stream, open_stream=open_stream,
filename=filename, filename=filename,
base64md5hash=base64md5hash, base64md5hash=base64md5hash,
@ -185,7 +185,7 @@ class CloudBackupAgent(BackupAgent):
try: try:
await async_files_delete_file( await async_files_delete_file(
self._cloud, self._cloud,
storage_type=_STORAGE_BACKUP, storage_type=StorageType.BACKUP,
filename=self._get_backup_filename(), filename=self._get_backup_filename(),
) )
except (ClientError, CloudError) as err: except (ClientError, CloudError) as err:
@ -194,7 +194,9 @@ class CloudBackupAgent(BackupAgent):
async def async_list_backups(self, **kwargs: Any) -> list[AgentBackup]: async def async_list_backups(self, **kwargs: Any) -> list[AgentBackup]:
"""List backups.""" """List backups."""
try: 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) _LOGGER.debug("Cloud backups: %s", backups)
except (ClientError, CloudError) as err: except (ClientError, CloudError) as err:
raise BackupAgentError("Failed to list backups") from err raise BackupAgentError("Failed to list backups") from err

View File

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

View File

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

View File

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

2
requirements.txt generated
View File

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

2
requirements_all.txt generated
View File

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

View File

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