Fix entity_id change for Google Cast (#49743)

pull/49828/head
Erik Montnemery 2021-04-28 01:40:41 +02:00 committed by GitHub
parent a30b21ad50
commit 575b8340fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -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):