Fix apple tv not coming online if connected before entity created (#74488)

pull/74489/head
J. Nick Koston 2022-07-05 23:00:40 -05:00 committed by GitHub
parent a70cb8af78
commit 3d63d4fb36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,10 @@ class AppleTVEntity(Entity):
self.atv = None
self.async_write_ha_state()
if self.manager.atv:
# ATV is already connected
_async_connected(self.manager.atv)
self.async_on_remove(
async_dispatcher_connect(
self.hass, f"{SIGNAL_CONNECTED}_{self.unique_id}", _async_connected