Snapcast server and data stored in the Home Assistant data object.
Definition at line 20 of file server.py.
◆ __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.
◆ 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.
◆ _entry_id
| homeassistant.components.snapcast.server.HomeAssistantSnapcast._entry_id |
|
private |
The documentation for this class was generated from the following file:
- core/homeassistant/components/snapcast/server.py