Fix disconnect bug in Apple TV integration (#65385)

This commit is contained in:
Pierre Ståhl 2022-02-01 22:44:06 +01:00 committed by Franck Nijhof
parent 40a174cc70
commit fcd14e2830
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 0 additions and 6 deletions

View File

@ -179,7 +179,6 @@ class AppleTVManager:
def _handle_disconnect(self):
"""Handle that the device disconnected and restart connect loop."""
if self.atv:
self.atv.listener = None
self.atv.close()
self.atv = None
self._dispatch_send(SIGNAL_DISCONNECTED)
@ -196,8 +195,6 @@ class AppleTVManager:
self._is_on = False
try:
if self.atv:
self.atv.push_updater.listener = None
self.atv.push_updater.stop()
self.atv.close()
self.atv = None
if self._task:

View File

@ -168,9 +168,6 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
@callback
def async_device_disconnected(self):
"""Handle when connection was lost to device."""
self.atv.push_updater.stop()
self.atv.push_updater.listener = None
self.atv.power.listener = None
self._attr_supported_features = SUPPORT_APPLE_TV
@property