Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.sonos.switch Namespace Reference

Classes

class  SonosAlarmEntity
 
class  SonosSwitchEntity
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
tuple ALL_FEATURES
 
string ATTR_CROSSFADE = "cross_fade"
 
string ATTR_DURATION = "duration"
 
string ATTR_ID = "alarm_id"
 
string ATTR_INCLUDE_LINKED_ZONES = "include_linked_zones"
 
string ATTR_LOUDNESS = "loudness"
 
string ATTR_MUSIC_PLAYBACK_FULL_VOLUME = "surround_mode"
 
string ATTR_NIGHT_SOUND = "night_mode"
 
string ATTR_PLAY_MODE = "play_mode"
 
string ATTR_RECURRENCE = "recurrence"
 
string ATTR_SCHEDULED_TODAY = "scheduled_today"
 
string ATTR_SPEECH_ENHANCEMENT = "dialog_level"
 
string ATTR_STATUS_LIGHT = "status_light"
 
string ATTR_SUB_ENABLED = "sub_enabled"
 
string ATTR_SURROUND_ENABLED = "surround_enabled"
 
string ATTR_TOUCH_CONTROLS = "buttons_enabled"
 
string ATTR_VOLUME = "volume"
 
string COORDINATOR_FEATURES = ATTR_CROSSFADE
 
tuple POLL_REQUIRED
 
tuple WEEKEND_DAYS = (0, 6)
 

Detailed Description

Entity representing a Sonos Alarm.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.sonos.switch.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up Sonos from a config entry.

Definition at line 74 of file switch.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.sonos.switch._LOGGER = logging.getLogger(__name__)
private

Definition at line 32 of file switch.py.

◆ ALL_FEATURES

tuple homeassistant.components.sonos.switch.ALL_FEATURES
Initial value:
1 = (
2  ATTR_TOUCH_CONTROLS,
3  ATTR_CROSSFADE,
4  ATTR_LOUDNESS,
5  ATTR_MUSIC_PLAYBACK_FULL_VOLUME,
6  ATTR_NIGHT_SOUND,
7  ATTR_SPEECH_ENHANCEMENT,
8  ATTR_SUB_ENABLED,
9  ATTR_SURROUND_ENABLED,
10  ATTR_STATUS_LIGHT,
11 )

Definition at line 52 of file switch.py.

◆ ATTR_CROSSFADE

string homeassistant.components.sonos.switch.ATTR_CROSSFADE = "cross_fade"

Definition at line 42 of file switch.py.

◆ ATTR_DURATION

string homeassistant.components.sonos.switch.ATTR_DURATION = "duration"

Definition at line 34 of file switch.py.

◆ ATTR_ID

string homeassistant.components.sonos.switch.ATTR_ID = "alarm_id"

Definition at line 35 of file switch.py.

◆ ATTR_INCLUDE_LINKED_ZONES

string homeassistant.components.sonos.switch.ATTR_INCLUDE_LINKED_ZONES = "include_linked_zones"

Definition at line 40 of file switch.py.

◆ ATTR_LOUDNESS

string homeassistant.components.sonos.switch.ATTR_LOUDNESS = "loudness"

Definition at line 43 of file switch.py.

◆ ATTR_MUSIC_PLAYBACK_FULL_VOLUME

string homeassistant.components.sonos.switch.ATTR_MUSIC_PLAYBACK_FULL_VOLUME = "surround_mode"

Definition at line 44 of file switch.py.

◆ ATTR_NIGHT_SOUND

string homeassistant.components.sonos.switch.ATTR_NIGHT_SOUND = "night_mode"

Definition at line 45 of file switch.py.

◆ ATTR_PLAY_MODE

string homeassistant.components.sonos.switch.ATTR_PLAY_MODE = "play_mode"

Definition at line 36 of file switch.py.

◆ ATTR_RECURRENCE

string homeassistant.components.sonos.switch.ATTR_RECURRENCE = "recurrence"

Definition at line 37 of file switch.py.

◆ ATTR_SCHEDULED_TODAY

string homeassistant.components.sonos.switch.ATTR_SCHEDULED_TODAY = "scheduled_today"

Definition at line 38 of file switch.py.

◆ ATTR_SPEECH_ENHANCEMENT

string homeassistant.components.sonos.switch.ATTR_SPEECH_ENHANCEMENT = "dialog_level"

Definition at line 46 of file switch.py.

◆ ATTR_STATUS_LIGHT

string homeassistant.components.sonos.switch.ATTR_STATUS_LIGHT = "status_light"

Definition at line 47 of file switch.py.

◆ ATTR_SUB_ENABLED

string homeassistant.components.sonos.switch.ATTR_SUB_ENABLED = "sub_enabled"

Definition at line 48 of file switch.py.

◆ ATTR_SURROUND_ENABLED

string homeassistant.components.sonos.switch.ATTR_SURROUND_ENABLED = "surround_enabled"

Definition at line 49 of file switch.py.

◆ ATTR_TOUCH_CONTROLS

string homeassistant.components.sonos.switch.ATTR_TOUCH_CONTROLS = "buttons_enabled"

Definition at line 50 of file switch.py.

◆ ATTR_VOLUME

string homeassistant.components.sonos.switch.ATTR_VOLUME = "volume"

Definition at line 39 of file switch.py.

◆ COORDINATOR_FEATURES

string homeassistant.components.sonos.switch.COORDINATOR_FEATURES = ATTR_CROSSFADE

Definition at line 64 of file switch.py.

◆ POLL_REQUIRED

tuple homeassistant.components.sonos.switch.POLL_REQUIRED
Initial value:
1 = (
2  ATTR_TOUCH_CONTROLS,
3  ATTR_STATUS_LIGHT,
4 )

Definition at line 66 of file switch.py.

◆ WEEKEND_DAYS

tuple homeassistant.components.sonos.switch.WEEKEND_DAYS = (0, 6)

Definition at line 71 of file switch.py.