Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.alexa.handlers Namespace Reference

Functions

AlexaResponse async_api_accept_grant (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_activate (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_brightness (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_mode (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_range (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_target_temp (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_volume (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_adjust_volume_step (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_arm (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_bands_directive (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_changechannel (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_deactivate (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_decrease_color_temp (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_disarm (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_discovery (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_hold (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_increase_color_temp (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_initialize_camera_stream (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_lock (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_next (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_pause (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_play (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_previous (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_reportstate (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_resume (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_seek (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_select_input (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_brightness (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_color (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_color_temperature (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_eq_mode (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_mode (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_mute (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_range (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_target_temp (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_thermostat_mode (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_set_volume (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_skipchannel (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_stop (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_toggle_off (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_toggle_on (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_turn_off (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_turn_on (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
AlexaResponse async_api_unlock (ha.HomeAssistant hass, AbstractConfig config, AlexaDirective directive, ha.Context context)
 
float temperature_from_object (ha.HomeAssistant hass, dict[str, Any] temp_obj, bool interval=False)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string DIRECTIVE_NOT_SUPPORTED = "Entity does not support directive"
 
dictionary MIN_MAX_TEMP
 
dictionary SERVICE_SET_TEMPERATURE
 

Detailed Description

Alexa message handlers.

Function Documentation

◆ async_api_accept_grant()

AlexaResponse homeassistant.components.alexa.handlers.async_api_accept_grant ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Create a API formatted AcceptGrant response.

Async friendly.

Definition at line 146 of file handlers.py.

◆ async_api_activate()

AlexaResponse homeassistant.components.alexa.handlers.async_api_activate ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an activate request.

Definition at line 419 of file handlers.py.

◆ async_api_adjust_brightness()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_brightness ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an adjust brightness request.

Definition at line 297 of file handlers.py.

◆ async_api_adjust_mode()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_mode ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a AdjustMode request.

Requires capabilityResources supportedModes to be ordered.
Only supportedModes with ordered=True support the adjustMode directive.

Definition at line 1300 of file handlers.py.

◆ async_api_adjust_range()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_range ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a next request.

Definition at line 1519 of file handlers.py.

◆ async_api_adjust_target_temp()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_target_temp ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an adjust target temperature request for climates and water heaters.

Definition at line 920 of file handlers.py.

◆ async_api_adjust_volume()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_volume ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an adjust volume request.

Definition at line 628 of file handlers.py.

◆ async_api_adjust_volume_step()

AlexaResponse homeassistant.components.alexa.handlers.async_api_adjust_volume_step ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an adjust volume step request.

Definition at line 661 of file handlers.py.

◆ async_api_arm()

AlexaResponse homeassistant.components.alexa.handlers.async_api_arm ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a Security Panel Arm request.

Definition at line 1091 of file handlers.py.

◆ async_api_bands_directive()

AlexaResponse homeassistant.components.alexa.handlers.async_api_bands_directive ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Handle an AdjustBands, ResetBands, SetBands request.

Only mode directives are currently supported for the EqualizerController.

Definition at line 1852 of file handlers.py.

◆ async_api_changechannel()

AlexaResponse homeassistant.components.alexa.handlers.async_api_changechannel ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a change channel request.

Definition at line 1679 of file handlers.py.

◆ async_api_deactivate()

AlexaResponse homeassistant.components.alexa.handlers.async_api_deactivate ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a deactivate request.

Definition at line 454 of file handlers.py.

◆ async_api_decrease_color_temp()

AlexaResponse homeassistant.components.alexa.handlers.async_api_decrease_color_temp ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a decrease color temperature request.

Definition at line 371 of file handlers.py.

◆ async_api_disarm()

AlexaResponse homeassistant.components.alexa.handlers.async_api_disarm ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a Security Panel Disarm request.

Definition at line 1145 of file handlers.py.

◆ async_api_discovery()

AlexaResponse homeassistant.components.alexa.handlers.async_api_discovery ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Create a API formatted discovery response.

Async friendly.

Definition at line 115 of file handlers.py.

◆ async_api_hold()

AlexaResponse homeassistant.components.alexa.handlers.async_api_hold ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a TimeHoldController Hold request.

Definition at line 1867 of file handlers.py.

◆ async_api_increase_color_temp()

AlexaResponse homeassistant.components.alexa.handlers.async_api_increase_color_temp ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an increase color temperature request.

Definition at line 395 of file handlers.py.

◆ async_api_initialize_camera_stream()

AlexaResponse homeassistant.components.alexa.handlers.async_api_initialize_camera_stream ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a InitializeCameraStreams request.

Definition at line 1921 of file handlers.py.

◆ async_api_lock()

AlexaResponse homeassistant.components.alexa.handlers.async_api_lock ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a lock request.

Definition at line 483 of file handlers.py.

◆ async_api_next()

AlexaResponse homeassistant.components.alexa.handlers.async_api_next ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a next request.

Definition at line 792 of file handlers.py.

◆ async_api_pause()

AlexaResponse homeassistant.components.alexa.handlers.async_api_pause ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a pause request.

Definition at line 740 of file handlers.py.

◆ async_api_play()

AlexaResponse homeassistant.components.alexa.handlers.async_api_play ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a play request.

Definition at line 722 of file handlers.py.

◆ async_api_previous()

AlexaResponse homeassistant.components.alexa.handlers.async_api_previous ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a previous request.

Definition at line 810 of file handlers.py.

◆ async_api_reportstate()

AlexaResponse homeassistant.components.alexa.handlers.async_api_reportstate ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a ReportState request.

Definition at line 1080 of file handlers.py.

◆ async_api_resume()

AlexaResponse homeassistant.components.alexa.handlers.async_api_resume ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a TimeHoldController Resume request.

Definition at line 1894 of file handlers.py.

◆ async_api_seek()

AlexaResponse homeassistant.components.alexa.handlers.async_api_seek ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a seek request.

Definition at line 1774 of file handlers.py.

◆ async_api_select_input()

AlexaResponse homeassistant.components.alexa.handlers.async_api_select_input ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set input request.

Definition at line 579 of file handlers.py.

◆ async_api_set_brightness()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_brightness ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set brightness request.

Definition at line 275 of file handlers.py.

◆ async_api_set_color()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_color ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set color request.

Definition at line 323 of file handlers.py.

◆ async_api_set_color_temperature()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_color_temperature ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set color temperature request.

Definition at line 349 of file handlers.py.

◆ async_api_set_eq_mode()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_eq_mode ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a SetMode request for EqualizerController.

Definition at line 1820 of file handlers.py.

◆ async_api_set_mode()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_mode ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a SetMode directive.

Definition at line 1184 of file handlers.py.

◆ async_api_set_mute()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_mute ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set mute request.

Definition at line 700 of file handlers.py.

◆ async_api_set_range()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_range ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a next request.

Definition at line 1403 of file handlers.py.

◆ async_api_set_target_temp()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_target_temp ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set target temperature request.

Definition at line 851 of file handlers.py.

◆ async_api_set_thermostat_mode()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_thermostat_mode ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set thermostat mode request.

Definition at line 1006 of file handlers.py.

◆ async_api_set_volume()

AlexaResponse homeassistant.components.alexa.handlers.async_api_set_volume ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a set volume request.

Definition at line 556 of file handlers.py.

◆ async_api_skipchannel()

AlexaResponse homeassistant.components.alexa.handlers.async_api_skipchannel ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a skipchannel request.

Definition at line 1738 of file handlers.py.

◆ async_api_stop()

AlexaResponse homeassistant.components.alexa.handlers.async_api_stop ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a stop request.

Definition at line 758 of file handlers.py.

◆ async_api_toggle_off()

AlexaResponse homeassistant.components.alexa.handlers.async_api_toggle_off ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a toggle off request.

Definition at line 1364 of file handlers.py.

◆ async_api_toggle_on()

AlexaResponse homeassistant.components.alexa.handlers.async_api_toggle_on ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a toggle on request.

Definition at line 1318 of file handlers.py.

◆ async_api_turn_off()

AlexaResponse homeassistant.components.alexa.handlers.async_api_turn_off ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a turn off request.

Definition at line 222 of file handlers.py.

◆ async_api_turn_on()

AlexaResponse homeassistant.components.alexa.handlers.async_api_turn_on ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process a turn on request.

Definition at line 170 of file handlers.py.

◆ async_api_unlock()

AlexaResponse homeassistant.components.alexa.handlers.async_api_unlock ( ha.HomeAssistant  hass,
AbstractConfig  config,
AlexaDirective  directive,
ha.Context  context 
)
Process an unlock request.

Definition at line 507 of file handlers.py.

◆ temperature_from_object()

float homeassistant.components.alexa.handlers.temperature_from_object ( ha.HomeAssistant  hass,
dict[str, Any]  temp_obj,
bool   interval = False 
)
Get temperature from Temperature object in requested unit.

Definition at line 831 of file handlers.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.alexa.handlers._LOGGER = logging.getLogger(__name__)
private

Definition at line 86 of file handlers.py.

◆ DIRECTIVE_NOT_SUPPORTED

string homeassistant.components.alexa.handlers.DIRECTIVE_NOT_SUPPORTED = "Entity does not support directive"

Definition at line 87 of file handlers.py.

◆ MIN_MAX_TEMP

dictionary homeassistant.components.alexa.handlers.MIN_MAX_TEMP
Initial value:
1 = {
2  climate.DOMAIN: {
3  "min_temp": climate.ATTR_MIN_TEMP,
4  "max_temp": climate.ATTR_MAX_TEMP,
5  },
6  water_heater.DOMAIN: {
7  "min_temp": water_heater.ATTR_MIN_TEMP,
8  "max_temp": water_heater.ATTR_MAX_TEMP,
9  },
10 }

Definition at line 89 of file handlers.py.

◆ SERVICE_SET_TEMPERATURE

dictionary homeassistant.components.alexa.handlers.SERVICE_SET_TEMPERATURE
Initial value:
1 = {
2  climate.DOMAIN: climate.SERVICE_SET_TEMPERATURE,
3  water_heater.DOMAIN: water_heater.SERVICE_SET_TEMPERATURE,
4 }

Definition at line 100 of file handlers.py.