diff --git a/homeassistant/components/switchbot/manifest.json b/homeassistant/components/switchbot/manifest.json index 064ebf5e2f4..dfbfd9335a5 100644 --- a/homeassistant/components/switchbot/manifest.json +++ b/homeassistant/components/switchbot/manifest.json @@ -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"] } diff --git a/requirements_all.txt b/requirements_all.txt index 7c3cdb369dc..ed049044440 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a5e95f6f551..0244b601e9b 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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 diff --git a/tests/components/switchbot/test_lock.py b/tests/components/switchbot/test_lock.py index ea8939c8e41..859c818a6e3 100644 --- a/tests/components/switchbot/test_lock.py +++ b/tests/components/switchbot/test_lock.py @@ -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)