From 575b8340fc0f491b023f18c5c1cf71f208d9a21c Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 28 Apr 2021 01:40:41 +0200 Subject: [PATCH] Fix entity_id change for Google Cast (#49743) --- homeassistant/components/cast/media_player.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/homeassistant/components/cast/media_player.py b/homeassistant/components/cast/media_player.py index 0ca7f5f1682..9cad02f6c74 100644 --- a/homeassistant/components/cast/media_player.py +++ b/homeassistant/components/cast/media_player.py @@ -199,10 +199,6 @@ class CastDevice(MediaPlayerEntity): async def async_will_remove_from_hass(self) -> None: """Disconnect Chromecast object when removed.""" await self._async_disconnect() - if self._cast_info.uuid is not None: - # Remove the entity from the added casts so that it can dynamically - # be re-added again. - self.hass.data[ADDED_CAST_DEVICES_KEY].remove(self._cast_info.uuid) if self._add_remove_handler: self._add_remove_handler() self._add_remove_handler = None @@ -212,7 +208,6 @@ class CastDevice(MediaPlayerEntity): def async_set_cast_info(self, cast_info): """Set the cast information.""" - self._cast_info = cast_info async def async_connect_to_chromecast(self):