Delete devices / entities when we remove a config entry. (#23983)
* Remove device when last config entry removed * Remove entities when config entry removed * Update tests to use new behaviour
This commit is contained in:
parent
d7d83c683d
commit
f991ec15f2
5 changed files with 27 additions and 13 deletions
|
@ -261,9 +261,9 @@ async def test_remove_entry(hass, manager):
|
|||
# Just Group all_lights
|
||||
assert len(hass.states.async_all()) == 1
|
||||
|
||||
# Check that entity registry entry no longer references config_entry_id
|
||||
entity_entry = list(ent_reg.entities.values())[0]
|
||||
assert entity_entry.config_entry_id is None
|
||||
# Check that entity registry entry has been removed
|
||||
entity_entry_list = list(ent_reg.entities.values())
|
||||
assert not entity_entry_list
|
||||
|
||||
|
||||
async def test_remove_entry_handles_callback_error(hass, manager):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue