Purge entity and device registries when importing lcn from configuration.yaml (#54266)
* Identify LCN orphans in entity registry and device registry and remove them * Fix typing issues * Revert "Fix typing issues" This reverts commit eccd067b3b5f23135e6c8a79d25f7f2cbc2d0ae9. * Fix removal of devices which do not belong to given config_entry * Use helper for getting entities for config_entry * Rename variable
This commit is contained in:
parent
16088915eb
commit
ead6e7da1f
3 changed files with 81 additions and 11 deletions
|
@ -7,6 +7,8 @@ import pytest
|
|||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant.components.lcn.const import CONF_DIM_MODE, CONF_SK_NUM_TRIES, DOMAIN
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICES,
|
||||
CONF_ENTITIES,
|
||||
CONF_HOST,
|
||||
CONF_IP_ADDRESS,
|
||||
CONF_PASSWORD,
|
||||
|
@ -24,6 +26,8 @@ IMPORT_DATA = {
|
|||
CONF_PASSWORD: "lcn",
|
||||
CONF_SK_NUM_TRIES: 0,
|
||||
CONF_DIM_MODE: "STEPS200",
|
||||
CONF_DEVICES: [],
|
||||
CONF_ENTITIES: [],
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue