Restore accessory state into pairing using new HKC methods (#75276)
This commit is contained in:
parent
ecc219fbc1
commit
b9c8d65940
14 changed files with 130 additions and 91 deletions
|
@ -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, {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue