mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix disconnect bug in Apple TV integration (#65385)
This commit is contained in:
parent
40a174cc70
commit
fcd14e2830
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user