Skip to content

Commit

Permalink
Mark discover_chromecasts as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed Nov 21, 2023
1 parent 8e86fbe commit 9ffe2be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pychromecast/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,16 +619,19 @@ def discover_chromecasts(
Discover chromecasts on the network.
Returns a tuple of:
A list of chromecast devices, or an empty list if no matching chromecasts were
found.
A list of chromecast devices, or an empty list if no chromecasts were found.
A service browser to keep the Chromecast mDNS data updated. When updates
are (no longer) needed, call browser.stop_discovery().
:param zeroconf_instance: An existing zeroconf instance.
"""

_LOGGER.info(
"discover_chromecasts is deprecated and will be removed in June 2024, update to use CastBrowser instead."
)

def add_callback(_uuid, _service):
"""Called when zeroconf has discovered a new chromecast."""
"""Called when a new chromecast has been discovered."""
if max_devices is not None and browser.count >= max_devices:
discover_complete.set()

Expand Down

0 comments on commit 9ffe2be

Please sign in to comment.