CoordinatorEntity to call super added_to_hass (#39416)

pull/39422/head
Paulus Schoutsen 2020-08-30 15:42:33 +02:00 committed by GitHub
parent 3d1ff5b8d0
commit 5a7f1d62c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -211,6 +211,7 @@ class CoordinatorEntity(entity.Entity):
async def async_added_to_hass(self) -> None:
"""When entity is added to hass."""
await super().async_added_to_hass()
self.async_on_remove(
self.coordinator.async_add_listener(self.async_write_ha_state)
)