Skip to content

Commit

Permalink
Mark discover_chromecasts as deprecated (#766)
Browse files Browse the repository at this point in the history
* Mark discover_chromecasts as deprecated

* Update pychromecast/discovery.py
  • Loading branch information
emontnemery authored Nov 21, 2023
1 parent 819d37b commit 308ad17
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pychromecast/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,17 +618,23 @@ def discover_chromecasts(
"""
Discover chromecasts on the network.
Deprecated as of February 2021, will be removed in June 2024.
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 308ad17

Please sign in to comment.