Bump pyswitchbot to 0.64.1 (#145360)

This commit is contained in:
Retha Runolfsson 2025-05-21 16:08:32 +08:00 committed by GitHub
parent 69a4d2107f
commit 3f72030d5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 6 deletions

View File

@ -40,5 +40,5 @@
"documentation": "https://www.home-assistant.io/integrations/switchbot",
"iot_class": "local_push",
"loggers": ["switchbot"],
"requirements": ["PySwitchbot==0.62.2"]
"requirements": ["PySwitchbot==0.64.1"]
}

2
requirements_all.txt generated
View File

@ -81,7 +81,7 @@ PyQRCode==1.2.1
PyRMVtransport==0.3.3
# homeassistant.components.switchbot
PySwitchbot==0.62.2
PySwitchbot==0.64.1
# homeassistant.components.switchmate
PySwitchmate==0.5.1

View File

@ -78,7 +78,7 @@ PyQRCode==1.2.1
PyRMVtransport==0.3.3
# homeassistant.components.switchbot
PySwitchbot==0.62.2
PySwitchbot==0.64.1
# homeassistant.components.syncthru
PySyncThru==0.8.0

View File

@ -45,9 +45,12 @@ async def test_lock_services(
entry = mock_entry_encrypted_factory(sensor_type=sensor_type)
entry.add_to_hass(hass)
with patch(
f"homeassistant.components.switchbot.lock.switchbot.SwitchbotLock.{mock_method}",
) as mocked_instance:
mocked_instance = AsyncMock(return_value=True)
with patch.multiple(
"homeassistant.components.switchbot.lock.switchbot.SwitchbotLock",
update=AsyncMock(return_value=None),
**{mock_method: mocked_instance},
):
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
@ -90,6 +93,7 @@ async def test_lock_services_with_night_latch_enabled(
with patch.multiple(
"homeassistant.components.switchbot.lock.switchbot.SwitchbotLock",
is_night_latch_enabled=MagicMock(return_value=True),
update=AsyncMock(return_value=None),
**{mock_method: mocked_instance},
):
assert await hass.config_entries.async_setup(entry.entry_id)
@ -142,6 +146,7 @@ async def test_exception_handling_lock_service(
with patch.multiple(
"homeassistant.components.switchbot.lock.switchbot.SwitchbotLock",
is_night_latch_enabled=MagicMock(return_value=True),
update=AsyncMock(return_value=None),
**{mock_method: AsyncMock(side_effect=exception)},
):
assert await hass.config_entries.async_setup(entry.entry_id)