Public Member Functions | |
| None | __init__ (self, *Any args) |
| Iterator[DidlFavorite] | __iter__ (self) |
| None | async_process_event (self, SonosEvent event, SonosSpeaker speaker) |
| None | async_update_entities (self, SoCo soco, int|None update_id=None) |
| int | count (self) |
| DidlFavorite|None | lookup_by_item_id (self, str item_id) |
| None | setup (self, SoCo soco) |
| bool | update_cache (self, SoCo soco, int|None update_id=None) |
Public Member Functions inherited from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator | |
| None | __init__ (self, HomeAssistant hass, str household_id) |
| str | class_type (self) |
Public Attributes | |
| last_processed_event_id | |
Public Attributes inherited from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator | |
| async_poll | |
| cache_update_lock | |
| hass | |
| household_id | |
Private Attributes | |
| _favorites | |
Coordinator class for Sonos favorites.
Definition at line 27 of file favorites.py.
| None homeassistant.components.sonos.favorites.SonosFavorites.__init__ | ( | self, | |
| *Any | args | ||
| ) |
Initialize the data.
Definition at line 30 of file favorites.py.
| Iterator[DidlFavorite] homeassistant.components.sonos.favorites.SonosFavorites.__iter__ | ( | self | ) |
Return an iterator for the known favorites.
Definition at line 36 of file favorites.py.
| None homeassistant.components.sonos.favorites.SonosFavorites.async_process_event | ( | self, | |
| SonosEvent | event, | ||
| SonosSpeaker | speaker | ||
| ) |
Process the event payload in an async lock and update entities.
Definition at line 69 of file favorites.py.
| None homeassistant.components.sonos.favorites.SonosFavorites.async_update_entities | ( | self, | |
| SoCo | soco, | ||
| int | None | update_id = None |
||
| ) |
Update the cache and update entities.
Reimplemented from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator.
Definition at line 55 of file favorites.py.
| int homeassistant.components.sonos.favorites.SonosFavorites.count | ( | self | ) |
Return the number of favorites.
Definition at line 47 of file favorites.py.
| DidlFavorite | None homeassistant.components.sonos.favorites.SonosFavorites.lookup_by_item_id | ( | self, | |
| str | item_id | ||
| ) |
Return the favorite object with the provided item_id.
Definition at line 51 of file favorites.py.
| None homeassistant.components.sonos.favorites.SonosFavorites.setup | ( | self, | |
| SoCo | soco | ||
| ) |
Override to send a signal on base class setup completion.
Reimplemented from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator.
Definition at line 41 of file favorites.py.
| bool homeassistant.components.sonos.favorites.SonosFavorites.update_cache | ( | self, | |
| SoCo | soco, | ||
| int | None | update_id = None |
||
| ) |
Update cache of known favorites and return if cache has changed.
Reimplemented from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator.
Definition at line 106 of file favorites.py.
|
private |
Definition at line 125 of file favorites.py.
| homeassistant.components.sonos.favorites.SonosFavorites.last_processed_event_id |
Definition at line 102 of file favorites.py.