From 5dc44500c3ed75b5639bc861461959773a38d003 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 11 Mar 2024 14:07:15 -1000 Subject: [PATCH] Make cast async_cast_discovered a callback function (#113111) Nothing was being awaited here and this function is never subclassed --- homeassistant/components/cast/media_player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/cast/media_player.py b/homeassistant/components/cast/media_player.py index 9d041cb7cfb..941b2e0675b 100644 --- a/homeassistant/components/cast/media_player.py +++ b/homeassistant/components/cast/media_player.py @@ -242,7 +242,8 @@ class CastDevice: self._status_listener.invalidate() self._status_listener = None - async def _async_cast_discovered(self, discover: ChromecastInfo) -> None: + @callback + def _async_cast_discovered(self, discover: ChromecastInfo) -> None: """Handle discovery of new Chromecast.""" if self._cast_info.uuid != discover.uuid: # Discovered is not our device.