mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Fix entity_id change for Google Cast (#49743)
This commit is contained in:
@@ -199,10 +199,6 @@ class CastDevice(MediaPlayerEntity):
|
|||||||
async def async_will_remove_from_hass(self) -> None:
|
async def async_will_remove_from_hass(self) -> None:
|
||||||
"""Disconnect Chromecast object when removed."""
|
"""Disconnect Chromecast object when removed."""
|
||||||
await self._async_disconnect()
|
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:
|
if self._add_remove_handler:
|
||||||
self._add_remove_handler()
|
self._add_remove_handler()
|
||||||
self._add_remove_handler = None
|
self._add_remove_handler = None
|
||||||
@@ -212,7 +208,6 @@ class CastDevice(MediaPlayerEntity):
|
|||||||
|
|
||||||
def async_set_cast_info(self, cast_info):
|
def async_set_cast_info(self, cast_info):
|
||||||
"""Set the cast information."""
|
"""Set the cast information."""
|
||||||
|
|
||||||
self._cast_info = cast_info
|
self._cast_info = cast_info
|
||||||
|
|
||||||
async def async_connect_to_chromecast(self):
|
async def async_connect_to_chromecast(self):
|
||||||
|
Reference in New Issue
Block a user