Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.sonos.alarms.SonosAlarms Class Reference
Inheritance diagram for homeassistant.components.sonos.alarms.SonosAlarms:
[legend]
Collaboration diagram for homeassistant.components.sonos.alarms.SonosAlarms:
[legend]

Public Member Functions

None __init__ (self, *Any args)
 
Iterator __iter__ (self)
 
None async_process_event (self, SonosEvent event, SonosSpeaker speaker)
 
None async_update_entities (self, SoCo soco, int|None update_id=None)
 
Alarm|None get (self, str alarm_id)
 
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)
 
None setup (self, SoCo soco)
 

Public Attributes

 last_processed_event_id
 
- Public Attributes inherited from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator
 async_poll
 
 cache_update_lock
 
 hass
 
 household_id
 

Detailed Description

Coordinator class for Sonos alarms.

Definition at line 25 of file alarms.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.sonos.alarms.SonosAlarms.__init__ (   self,
*Any  args 
)
Initialize the data.

Definition at line 28 of file alarms.py.

Member Function Documentation

◆ __iter__()

Iterator homeassistant.components.sonos.alarms.SonosAlarms.__iter__ (   self)
Return an iterator for the known alarms.

Definition at line 34 of file alarms.py.

◆ async_process_event()

None homeassistant.components.sonos.alarms.SonosAlarms.async_process_event (   self,
SonosEvent  event,
SonosSpeaker   speaker 
)
Process the event payload in an async lock and update entities.

Definition at line 62 of file alarms.py.

◆ async_update_entities()

None homeassistant.components.sonos.alarms.SonosAlarms.async_update_entities (   self,
SoCo  soco,
int | None   update_id = None 
)
Create and update alarms entities, return success.

Reimplemented from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator.

Definition at line 42 of file alarms.py.

◆ get()

Alarm | None homeassistant.components.sonos.alarms.SonosAlarms.get (   self,
str  alarm_id 
)
Get an Alarm instance.

Definition at line 38 of file alarms.py.

◆ update_cache()

bool homeassistant.components.sonos.alarms.SonosAlarms.update_cache (   self,
SoCo  soco,
int | None   update_id = None 
)
Update cache of known alarms and return if cache has changed.

Reimplemented from homeassistant.components.sonos.household_coordinator.SonosHouseholdCoordinator.

Definition at line 76 of file alarms.py.

Member Data Documentation

◆ last_processed_event_id

homeassistant.components.sonos.alarms.SonosAlarms.last_processed_event_id

Definition at line 97 of file alarms.py.


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