Bump ZHA dependencies (#118658)
* Bump bellows to 0.39.0 * Do not create a backup if there is no active ZHA gateway object * Bump universal-silabs-flasher as wellpull/118845/head
parent
4d2dc9a40e
commit
3c012c497b
|
@ -13,7 +13,13 @@ async def async_pre_backup(hass: HomeAssistant) -> None:
|
|||
"""Perform operations before a backup starts."""
|
||||
_LOGGER.debug("Performing coordinator backup")
|
||||
|
||||
zha_gateway = get_zha_gateway(hass)
|
||||
try:
|
||||
zha_gateway = get_zha_gateway(hass)
|
||||
except ValueError:
|
||||
# If ZHA config is in `configuration.yaml` and ZHA is not set up, do nothing
|
||||
_LOGGER.warning("No ZHA gateway exists, skipping coordinator backup")
|
||||
return
|
||||
|
||||
await zha_gateway.application_controller.backups.create_backup(load_devices=True)
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"universal_silabs_flasher"
|
||||
],
|
||||
"requirements": [
|
||||
"bellows==0.38.4",
|
||||
"bellows==0.39.0",
|
||||
"pyserial==3.5",
|
||||
"zha-quirks==0.0.116",
|
||||
"zigpy-deconz==0.23.1",
|
||||
|
@ -29,7 +29,7 @@
|
|||
"zigpy-xbee==0.20.1",
|
||||
"zigpy-zigate==0.12.0",
|
||||
"zigpy-znp==0.12.1",
|
||||
"universal-silabs-flasher==0.0.18",
|
||||
"universal-silabs-flasher==0.0.20",
|
||||
"pyserial-asyncio-fast==0.11"
|
||||
],
|
||||
"usb": [
|
||||
|
|
|
@ -547,7 +547,7 @@ beautifulsoup4==4.12.3
|
|||
# beewi-smartclim==0.0.10
|
||||
|
||||
# homeassistant.components.zha
|
||||
bellows==0.38.4
|
||||
bellows==0.39.0
|
||||
|
||||
# homeassistant.components.bmw_connected_drive
|
||||
bimmer-connected[china]==0.15.3
|
||||
|
@ -2794,7 +2794,7 @@ unifi_ap==0.0.1
|
|||
unifiled==0.11
|
||||
|
||||
# homeassistant.components.zha
|
||||
universal-silabs-flasher==0.0.18
|
||||
universal-silabs-flasher==0.0.20
|
||||
|
||||
# homeassistant.components.upb
|
||||
upb-lib==0.5.6
|
||||
|
|
|
@ -472,7 +472,7 @@ base36==0.1.1
|
|||
beautifulsoup4==4.12.3
|
||||
|
||||
# homeassistant.components.zha
|
||||
bellows==0.38.4
|
||||
bellows==0.39.0
|
||||
|
||||
# homeassistant.components.bmw_connected_drive
|
||||
bimmer-connected[china]==0.15.3
|
||||
|
@ -2162,7 +2162,7 @@ ultraheat-api==0.5.7
|
|||
unifi-discovery==1.1.8
|
||||
|
||||
# homeassistant.components.zha
|
||||
universal-silabs-flasher==0.0.18
|
||||
universal-silabs-flasher==0.0.20
|
||||
|
||||
# homeassistant.components.upb
|
||||
upb-lib==0.5.6
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Unit tests for ZHA backup platform."""
|
||||
|
||||
from unittest.mock import AsyncMock
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from zigpy.application import ControllerApplication
|
||||
|
||||
|
@ -22,6 +22,13 @@ async def test_pre_backup(
|
|||
)
|
||||
|
||||
|
||||
@patch("homeassistant.components.zha.backup.get_zha_gateway", side_effect=ValueError())
|
||||
async def test_pre_backup_no_gateway(hass: HomeAssistant, setup_zha) -> None:
|
||||
"""Test graceful backup failure when no gateway exists."""
|
||||
await setup_zha()
|
||||
await async_pre_backup(hass)
|
||||
|
||||
|
||||
async def test_post_backup(hass: HomeAssistant, setup_zha) -> None:
|
||||
"""Test no-op `async_post_backup`."""
|
||||
await setup_zha()
|
||||
|
|
Loading…
Reference in New Issue