Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.snapcast.server.HomeAssistantSnapcast Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, snapcast.control.Snapserver server, str hpid, str entry_id)
 
None disconnect (self)
 
None on_add_client (self, Snapclient client)
 
None on_connect (self)
 
None on_disconnect (self, Exception|None ex)
 
None on_update (self)
 

Private Attributes

 _entry_id
 

Detailed Description

Snapcast server and data stored in the Home Assistant data object.

Definition at line 20 of file server.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.__init__ (   self,
HomeAssistant  hass,
snapcast.control.Snapserver  server,
str  hpid,
str  entry_id 
)
Initialize the HomeAssistantSnapcast object.

Parameters
----------
hass: HomeAssistant
    hass object
server : snapcast.control.Snapserver
    Snapcast server
hpid : str
    host and port
entry_id: str
    ConfigEntry entry_id

Returns
-------
None

Definition at line 25 of file server.py.

Member Function Documentation

◆ disconnect()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.disconnect (   self)
Disconnect from server.

Definition at line 63 of file server.py.

◆ on_add_client()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.on_add_client (   self,
Snapclient  client 
)
Add a Snapcast client.

Parameters
----------
client : Snapclient
    Snapcast client to be added to HA.

Definition at line 131 of file server.py.

◆ on_connect()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.on_connect (   self)
Activate all entities and update.

Definition at line 112 of file server.py.

◆ on_disconnect()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.on_disconnect (   self,
Exception | None  ex 
)
Deactivate all entities.

Definition at line 121 of file server.py.

◆ on_update()

None homeassistant.components.snapcast.server.HomeAssistantSnapcast.on_update (   self)
Update all entities.

Retrieve all groups/clients from server and add/update/delete entities.

Definition at line 71 of file server.py.

Member Data Documentation

◆ _entry_id

homeassistant.components.snapcast.server.HomeAssistantSnapcast._entry_id
private

Definition at line 53 of file server.py.


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