Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.kef.media_player Namespace Reference

Classes

class  KefMediaPlayer
 

Functions

None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 
def get_ip_mode (host)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_INVERSE_SPEAKER_MODE = "inverse_speaker_mode"
 
string CONF_MAX_VOLUME = "maximum_volume"
 
string CONF_STANDBY_TIME = "standby_time"
 
string CONF_SUPPORTS_ON = "supports_on"
 
string CONF_VOLUME_STEP = "volume_step"
 
bool DEFAULT_INVERSE_SPEAKER_MODE = False
 
float DEFAULT_MAX_VOLUME = 0.5
 
string DEFAULT_NAME = "KEF"
 
int DEFAULT_PORT = 50001
 
bool DEFAULT_SUPPORTS_ON = True
 
float DEFAULT_VOLUME_STEP = 0.05
 
string DOMAIN = "kef"
 
 DSP_SCAN_INTERVAL = timedelta(seconds=3600)
 
 PLATFORM_SCHEMA
 
 SCAN_INTERVAL = timedelta(seconds=30)
 
string SERVICE_DESK_DB = "set_desk_db"
 
string SERVICE_HIGH_HZ = "set_high_hz"
 
string SERVICE_LOW_HZ = "set_low_hz"
 
string SERVICE_MODE = "set_mode"
 
string SERVICE_SUB_DB = "set_sub_db"
 
string SERVICE_TREBLE_DB = "set_treble_db"
 
string SERVICE_UPDATE_DSP = "update_dsp"
 
string SERVICE_WALL_DB = "set_wall_db"
 
dictionary SOURCES = {"LSX": ["Wifi", "Bluetooth", "Aux", "Opt"]}
 

Detailed Description

Platform for the KEF Wireless Speakers.

Function Documentation

◆ async_setup_platform()

None homeassistant.components.kef.media_player.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the KEF platform.

Definition at line 91 of file media_player.py.

◆ get_ip_mode()

def homeassistant.components.kef.media_player.get_ip_mode (   host)
Get the 'mode' used to retrieve the MAC address.

Definition at line 79 of file media_player.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.kef.media_player._LOGGER = logging.getLogger(__name__)
private

Definition at line 29 of file media_player.py.

◆ CONF_INVERSE_SPEAKER_MODE

string homeassistant.components.kef.media_player.CONF_INVERSE_SPEAKER_MODE = "inverse_speaker_mode"

Definition at line 47 of file media_player.py.

◆ CONF_MAX_VOLUME

string homeassistant.components.kef.media_player.CONF_MAX_VOLUME = "maximum_volume"

Definition at line 45 of file media_player.py.

◆ CONF_STANDBY_TIME

string homeassistant.components.kef.media_player.CONF_STANDBY_TIME = "standby_time"

Definition at line 49 of file media_player.py.

◆ CONF_SUPPORTS_ON

string homeassistant.components.kef.media_player.CONF_SUPPORTS_ON = "supports_on"

Definition at line 48 of file media_player.py.

◆ CONF_VOLUME_STEP

string homeassistant.components.kef.media_player.CONF_VOLUME_STEP = "volume_step"

Definition at line 46 of file media_player.py.

◆ DEFAULT_INVERSE_SPEAKER_MODE

bool homeassistant.components.kef.media_player.DEFAULT_INVERSE_SPEAKER_MODE = False

Definition at line 35 of file media_player.py.

◆ DEFAULT_MAX_VOLUME

float homeassistant.components.kef.media_player.DEFAULT_MAX_VOLUME = 0.5

Definition at line 33 of file media_player.py.

◆ DEFAULT_NAME

string homeassistant.components.kef.media_player.DEFAULT_NAME = "KEF"

Definition at line 31 of file media_player.py.

◆ DEFAULT_PORT

int homeassistant.components.kef.media_player.DEFAULT_PORT = 50001

Definition at line 32 of file media_player.py.

◆ DEFAULT_SUPPORTS_ON

bool homeassistant.components.kef.media_player.DEFAULT_SUPPORTS_ON = True

Definition at line 36 of file media_player.py.

◆ DEFAULT_VOLUME_STEP

float homeassistant.components.kef.media_player.DEFAULT_VOLUME_STEP = 0.05

Definition at line 34 of file media_player.py.

◆ DOMAIN

string homeassistant.components.kef.media_player.DOMAIN = "kef"

Definition at line 38 of file media_player.py.

◆ DSP_SCAN_INTERVAL

homeassistant.components.kef.media_player.DSP_SCAN_INTERVAL = timedelta(seconds=3600)

Definition at line 60 of file media_player.py.

◆ PLATFORM_SCHEMA

homeassistant.components.kef.media_player.PLATFORM_SCHEMA
Initial value:
1 = MEDIA_PLAYER_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_HOST): cv.string,
4  vol.Required(CONF_TYPE): vol.In(["LS50", "LSX"]),
5  vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
6  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
7  vol.Optional(CONF_MAX_VOLUME, default=DEFAULT_MAX_VOLUME): cv.small_float,
8  vol.Optional(CONF_VOLUME_STEP, default=DEFAULT_VOLUME_STEP): cv.small_float,
9  vol.Optional(
10  CONF_INVERSE_SPEAKER_MODE, default=DEFAULT_INVERSE_SPEAKER_MODE
11  ): cv.boolean,
12  vol.Optional(CONF_SUPPORTS_ON, default=DEFAULT_SUPPORTS_ON): cv.boolean,
13  vol.Optional(CONF_STANDBY_TIME): vol.In([20, 60]),
14  }
15 )

Definition at line 62 of file media_player.py.

◆ SCAN_INTERVAL

homeassistant.components.kef.media_player.SCAN_INTERVAL = timedelta(seconds=30)

Definition at line 40 of file media_player.py.

◆ SERVICE_DESK_DB

string homeassistant.components.kef.media_player.SERVICE_DESK_DB = "set_desk_db"

Definition at line 52 of file media_player.py.

◆ SERVICE_HIGH_HZ

string homeassistant.components.kef.media_player.SERVICE_HIGH_HZ = "set_high_hz"

Definition at line 55 of file media_player.py.

◆ SERVICE_LOW_HZ

string homeassistant.components.kef.media_player.SERVICE_LOW_HZ = "set_low_hz"

Definition at line 56 of file media_player.py.

◆ SERVICE_MODE

string homeassistant.components.kef.media_player.SERVICE_MODE = "set_mode"

Definition at line 51 of file media_player.py.

◆ SERVICE_SUB_DB

string homeassistant.components.kef.media_player.SERVICE_SUB_DB = "set_sub_db"

Definition at line 57 of file media_player.py.

◆ SERVICE_TREBLE_DB

string homeassistant.components.kef.media_player.SERVICE_TREBLE_DB = "set_treble_db"

Definition at line 54 of file media_player.py.

◆ SERVICE_UPDATE_DSP

string homeassistant.components.kef.media_player.SERVICE_UPDATE_DSP = "update_dsp"

Definition at line 58 of file media_player.py.

◆ SERVICE_WALL_DB

string homeassistant.components.kef.media_player.SERVICE_WALL_DB = "set_wall_db"

Definition at line 53 of file media_player.py.

◆ SOURCES

dictionary homeassistant.components.kef.media_player.SOURCES = {"LSX": ["Wifi", "Bluetooth", "Aux", "Opt"]}

Definition at line 42 of file media_player.py.