Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.sonos.SonosDiscoveryManager Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, ConfigEntry entry, SonosData data, list[str] hosts)
 
None async_add_speakers (self, set[SoCo] socos, SubscriptionBase|None zgs_subscription, str|None zgs_subscription_uid)
 
None async_discovered_player (self, str source, ssdp.SsdpServiceInfo info, str discovered_ip, str uid, str|int|None boot_seqnum, str model, str|None mdns_name)
 
None async_poll_manual_hosts (self, datetime.datetime|None now=None)
 
None async_shutdown (self)
 
None async_subscribe_to_zone_updates (self, str ip_address)
 
bool is_device_invisible (self, str ip_address)
 
None setup_platforms_and_discovery (self)
 

Public Attributes

 creation_lock
 
 data
 
 discovery_lock
 
 entry
 
 hass
 
 hosts
 

Private Member Functions

None _add_speaker (self, SoCo soco, SubscriptionBase|None zone_group_state_sub)
 
None _async_handle_discovery_message (self, str uid, str discovered_ip, str source, int|None boot_seqnum=None)
 
None _async_ssdp_discovered_player (self, ssdp.SsdpServiceInfo info, ssdp.SsdpChange change)
 
None _async_stop_event_listener (self, Event|None event=None)
 
None _stop_manual_heartbeat (self, Event|None event=None)
 

Private Attributes

 _known_invisible
 
 _manual_config_required
 

Detailed Description

Manage sonos discovery.

Definition at line 178 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.sonos.SonosDiscoveryManager.__init__ (   self,
HomeAssistant  hass,
ConfigEntry  entry,
SonosData  data,
list[str]   hosts 
)
Init discovery manager.

Definition at line 181 of file __init__.py.

Member Function Documentation

◆ _add_speaker()

None homeassistant.components.sonos.SonosDiscoveryManager._add_speaker (   self,
SoCo  soco,
SubscriptionBase | None   zone_group_state_sub 
)
private
Create and set up a new SonosSpeaker instance.

Definition at line 360 of file __init__.py.

◆ _async_handle_discovery_message()

None homeassistant.components.sonos.SonosDiscoveryManager._async_handle_discovery_message (   self,
str  uid,
str  discovered_ip,
str  source,
int | None   boot_seqnum = None 
)
private
Handle discovered player creation and activity.

Definition at line 477 of file __init__.py.

◆ _async_ssdp_discovered_player()

None homeassistant.components.sonos.SonosDiscoveryManager._async_ssdp_discovered_player (   self,
ssdp.SsdpServiceInfo  info,
ssdp.SsdpChange   change 
)
private

Definition at line 502 of file __init__.py.

◆ _async_stop_event_listener()

None homeassistant.components.sonos.SonosDiscoveryManager._async_stop_event_listener (   self,
Event | None   event = None 
)
private

Definition at line 308 of file __init__.py.

◆ _stop_manual_heartbeat()

None homeassistant.components.sonos.SonosDiscoveryManager._stop_manual_heartbeat (   self,
Event | None   event = None 
)
private

Definition at line 334 of file __init__.py.

◆ async_add_speakers()

None homeassistant.components.sonos.SonosDiscoveryManager.async_add_speakers (   self,
set[SoCo]  socos,
SubscriptionBase | None  zgs_subscription,
str | None  zgs_subscription_uid 
)
Create and set up new SonosSpeaker instances.

Definition at line 339 of file __init__.py.

◆ async_discovered_player()

None homeassistant.components.sonos.SonosDiscoveryManager.async_discovered_player (   self,
str  source,
ssdp.SsdpServiceInfo  info,
str  discovered_ip,
str  uid,
str | int | None  boot_seqnum,
str  model,
str | None  mdns_name 
)
Handle discovery via ssdp or zeroconf.

Definition at line 529 of file __init__.py.

◆ async_poll_manual_hosts()

None homeassistant.components.sonos.SonosDiscoveryManager.async_poll_manual_hosts (   self,
datetime.datetime | None   now = None 
)
Add and maintain Sonos devices from a manual configuration.

Definition at line 384 of file __init__.py.

◆ async_shutdown()

None homeassistant.components.sonos.SonosDiscoveryManager.async_shutdown (   self)
Stop all running tasks.

Definition at line 195 of file __init__.py.

◆ async_subscribe_to_zone_updates()

None homeassistant.components.sonos.SonosDiscoveryManager.async_subscribe_to_zone_updates (   self,
str  ip_address 
)
Test subscriptions and create SonosSpeakers based on results.

Definition at line 204 of file __init__.py.

◆ is_device_invisible()

bool homeassistant.components.sonos.SonosDiscoveryManager.is_device_invisible (   self,
str  ip_address 
)
Check if device at provided IP is known to be invisible.

Definition at line 200 of file __init__.py.

◆ setup_platforms_and_discovery()

None homeassistant.components.sonos.SonosDiscoveryManager.setup_platforms_and_discovery (   self)
Set up platforms and discovery.

Definition at line 572 of file __init__.py.

Member Data Documentation

◆ _known_invisible

homeassistant.components.sonos.SonosDiscoveryManager._known_invisible
private

Definition at line 224 of file __init__.py.

◆ _manual_config_required

homeassistant.components.sonos.SonosDiscoveryManager._manual_config_required
private

Definition at line 193 of file __init__.py.

◆ creation_lock

homeassistant.components.sonos.SonosDiscoveryManager.creation_lock

Definition at line 191 of file __init__.py.

◆ data

homeassistant.components.sonos.SonosDiscoveryManager.data

Definition at line 187 of file __init__.py.

◆ discovery_lock

homeassistant.components.sonos.SonosDiscoveryManager.discovery_lock

Definition at line 190 of file __init__.py.

◆ entry

homeassistant.components.sonos.SonosDiscoveryManager.entry

Definition at line 186 of file __init__.py.

◆ hass

homeassistant.components.sonos.SonosDiscoveryManager.hass

Definition at line 185 of file __init__.py.

◆ hosts

homeassistant.components.sonos.SonosDiscoveryManager.hosts

Definition at line 188 of file __init__.py.


The documentation for this class was generated from the following file: