Add support for async_remove_config_entry_device to homekit_controller (#72630)
This commit is contained in:
parent
233f086853
commit
e0614953a2
3 changed files with 73 additions and 1 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue