Make cast async_cast_discovered a callback function (#113111)

Nothing was being awaited here and this function
is never subclassed
This commit is contained in:
J. Nick Koston 2024-03-11 14:07:15 -10:00 committed by GitHub
parent 620433a79d
commit 5dc44500c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.