1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Mark entities as unavailable when they are removed but are still registered (#45528)

* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
This commit is contained in:
Paulus Schoutsen
2021-02-08 10:45:46 +01:00
committed by GitHub
parent aa005af266
commit 9e07910ab0
73 changed files with 439 additions and 222 deletions

View File

@@ -517,7 +517,7 @@ class EntityPlatform:
if not self.entities:
return
tasks = [self.async_remove_entity(entity_id) for entity_id in self.entities]
tasks = [entity.async_remove() for entity in self.entities.values()]
await asyncio.gather(*tasks)