mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 04:19:34 +00:00
Restore accessory state into pairing using new HKC methods (#75276)
This commit is contained in:
@@ -111,8 +111,16 @@ async def test_offline_device_raises(hass, controller):
|
||||
nonlocal is_connected
|
||||
return is_connected
|
||||
|
||||
def get_characteristics(self, chars, *args, **kwargs):
|
||||
raise AccessoryDisconnectedError("any")
|
||||
async def async_populate_accessories_state(self, *args, **kwargs):
|
||||
nonlocal is_connected
|
||||
if not is_connected:
|
||||
raise AccessoryDisconnectedError("any")
|
||||
|
||||
async def get_characteristics(self, chars, *args, **kwargs):
|
||||
nonlocal is_connected
|
||||
if not is_connected:
|
||||
raise AccessoryDisconnectedError("any")
|
||||
return {}
|
||||
|
||||
with patch("aiohomekit.testing.FakePairing", OfflineFakePairing):
|
||||
await async_setup_component(hass, DOMAIN, {})
|
||||
|
||||
Reference in New Issue
Block a user