Add support for async_remove_config_entry_device to homekit_controller (#72630)

This commit is contained in:
J. Nick Koston 2022-05-28 09:47:14 -10:00 committed by GitHub
parent 233f086853
commit e0614953a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 1 deletions

View file

@ -372,3 +372,17 @@ async def assert_devices_and_entities_created(
# Root device must not have a via, otherwise its not the device
assert root_device.via_device_id is None
async def remove_device(ws_client, device_id, config_entry_id):
"""Remove config entry from a device."""
await ws_client.send_json(
{
"id": 5,
"type": "config/device_registry/remove_config_entry",
"config_entry_id": config_entry_id,
"device_id": device_id,
}
)
response = await ws_client.receive_json()
return response["success"]