From 371b5b5ca54818be4ffc9eeb2a34939190d06d60 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Jun 2021 14:10:57 -1000 Subject: [PATCH] Update ssdp callback matching to support MATCH_ALL (#956) --- docs/network_discovery.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/network_discovery.md b/docs/network_discovery.md index dc17386b..f868e3a5 100644 --- a/docs/network_discovery.md +++ b/docs/network_discovery.md @@ -119,6 +119,22 @@ entry.async_on_unload( ) ``` +The below example shows registering to get callbacks when the `x-rincon-bootseq` header is present. + +``` +from homeassistant.components import ssdp +from homeassistant.const import MATCH_ALL + +... + +entry.async_on_unload( + ssdp.async_register_callback( + hass, _async_discovered_player, {"x-rincon-bootseq": MATCH_ALL} + ) +) +``` + + ## Network For integrations that use a discovery method that is not built-in and need to access the user's network adapter configuration, the following helper API should be used.