mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27: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):
|
def _handle_disconnect(self):
|
||||||
"""Handle that the device disconnected and restart connect loop."""
|
"""Handle that the device disconnected and restart connect loop."""
|
||||||
if self.atv:
|
if self.atv:
|
||||||
self.atv.listener = None
|
|
||||||
self.atv.close()
|
self.atv.close()
|
||||||
self.atv = None
|
self.atv = None
|
||||||
self._dispatch_send(SIGNAL_DISCONNECTED)
|
self._dispatch_send(SIGNAL_DISCONNECTED)
|
||||||
@ -196,8 +195,6 @@ class AppleTVManager:
|
|||||||
self._is_on = False
|
self._is_on = False
|
||||||
try:
|
try:
|
||||||
if self.atv:
|
if self.atv:
|
||||||
self.atv.push_updater.listener = None
|
|
||||||
self.atv.push_updater.stop()
|
|
||||||
self.atv.close()
|
self.atv.close()
|
||||||
self.atv = None
|
self.atv = None
|
||||||
if self._task:
|
if self._task:
|
||||||
|
@ -168,9 +168,6 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
|
|||||||
@callback
|
@callback
|
||||||
def async_device_disconnected(self):
|
def async_device_disconnected(self):
|
||||||
"""Handle when connection was lost to device."""
|
"""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
|
self._attr_supported_features = SUPPORT_APPLE_TV
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user