Access Token URI: https://[YOUR HOME ASSISTANT URL][:PORT]/auth/token
Although it is possible to assign a different port, it is preferable to use port 443, so in that case make sure your firewall/proxy is forwarding via port 443.
Read more from the Alexa developer documentation about requirements for account linking.
Note
Despite the Alexa documentation’s disclaimer, however, Let’s Encrypt certificates are still accepted.
Important
You must use a valid/trusted SSL certificate for account linking to work. Self signed certificates will not work, but you can use a free Let’s Encrypt certificate.
Client ID:
https://pitangui.amazon.com/ if you are in US or BR
https://layla.amazon.com/ if you are in EU
https://alexa.amazon.co.jp/ if you are in JP and AU (not verified yet)
The trailing slash is important here.
Client Secret: input anything you like, Home Assistant does not check this field
Your Authentication Scheme: make sure you selected Credentials in request body. Home Assistant does not support HTTP Basic.
Scope: Click + Add scope and input smart_home, Home Assistant is not using it yet, we may use it in the future when we allow more fine-grained access control.
You can leave Domain List and Default Access Token Expiration Time as empty.
Save button in the top right corner.More -> Skills & Games -> Your Skills -> Dev
Enable to use.Discover Devices
Example configuration:
alexa:
smart_home:
locale: en-US
endpoint: https://api.amazonalexa.com/v3/events
client_id: YOUR_SKILL_CLIENT_ID
client_secret: YOUR_SKILL_CLIENT_SECRET
filter:
include_entities:
- light.kitchen
- light.kitchen_left
include_entity_globs:
- binary_sensor.*_motion
include_domains:
- switch
exclude_entities:
- switch.outside
entity_config:
light.kitchen:
name: "Custom Name for Alexa"
description: "The light in the kitchen"
switch.stairs:
display_categories: LIGHTYAML
Alexa configuration
Alexa Smart Home configuration
locale string (Optional, default: en-US)
The locale of your Alexa devices. Supported locales are de-DE, en-AU, en-CA, en-GB, en-IN, en-US, es-ES, es-MX, es-US,fr-CA, fr-FR, hi-IN, it-IT, ja-JP, nl-NL, and pt-BR. See Alexa Locale for additional information.
To enable proactive events, you send a message to the Alexa event gateway, send it to the event endpoint that aligns with the geographic availability of your smart home skill. Following is the list of endpoints and the regions they cover. See Proactive Events for more information.
https://api.amazonalexa.com/v3/events
https://api.eu.amazonalexa.com/v3/events
https://api.fe.amazonalexa.com/v3/events
Filter domains and entities for Alexa. (Configure Filter)
Configuration for specific entities. All subordinate keys are the corresponding entity ids or the domains, e.g., alarm_control_panel.woowoo.
Additional options for specific entities.
display_categories string (Optional)
Display category and iconography each entity is shown in the Alexa app. Separate each category with a comma. First category is primary. e.g., MUSIC_SYSTEM,STREAMING_DEVICE,SPEAKER. See Alexa Display Categories for a list of available categories.
The locale should match the location and language used for your Amazon echo devices.
The supported locales are:
de-DEen-AUen-CAen-GBen-INen-USes-ESes-MXes-USfr-CAfr-FRhi-INit-ITja-JPnl-NLpt-BRSee List of Capability Interfaces and Supported Locales.
The endpoint, client_id and client_secret are optional, and are only required if you want to enable Alexa’s proactive mode (i.e., “Send Alexa Events” enabled). Please note the following if you want to enable proactive mode:
client_id and client_secret are not the ones used by the skill that have been set up using “Login with Amazon” (in the Alexa Developer Console: Build > Account Linking), but rather from the “Alexa Skill Messaging” (in the Alexa Developer Console: Build > Permissions > Alexa Skill Messaging). To get them, you need to enable the “Send Alexa Events” permission.By default, no entity will be excluded. To limit which entities are being exposed to Alexa, you can use the filter parameter. Keep in mind that only supported platforms can be added.
# Example filter to include specified domains and exclude specified entities
alexa:
smart_home:
filter:
include_domains:
- alarm_control_panel
- light
include_entity_globs:
- binary_sensor.*_occupancy
exclude_entities:
- light.kitchen_lightYAML
Filters are applied as follows:
The following characters can be used in entity globs:
* - The asterisk represents zero, one, or multiple characters
? - The question mark represents zero or one character
See the troubleshooting if you’re experiencing issues setting up the integration.
Configure a display category to override the display category and iconography each entity is shown in the Alexa app. This makes it easier to find and monitor devices.
light.kitchen_light:
display_categories: LIGHT,SWITCHYAML
Note
Devices such as cameras, garage doors, and alarm control panels require specific display categories to provide all available features from Amazon Alexa. Overriding the default display category will limit features provided by Amazon Alexa.
See Alexa Display Categories for a complete list
Home Assistant supports the following integrations through Alexa using a Smart Home Skill. For Home Assistant Cloud Users, documentation can be found here.
The following paragraphs explain the features of the platforms that are currently supported.
Arm and disarm Alarm control panel entities. Ask Alexa for the state of the alarm control panel entity.
The alarm control panel state must be in the disarmed state before arming. Alexa does not support switching from an armed state without first disarming, e.g., switching from armed_home to armed_night.
The alarm control panel state armed_custom_bypass isn’t supported by Alexa and is treated as armed_home.
Note
Alexa does not support arming with voice PIN at this time. Therefore if the alarm control panel requires a code for arming or the code_arm_required attribute is true, the entity will not be exposed during discovery.
The alarm control panel may default the code_arm_required attribute to true even if the platform does not support or require it. Use the entity customization tool to override code_arm_required to false and expose the alarm control panel during discovery.
Users must opt-in to the disarm by voice feature in the Alexa App. Alexa will require a 4 digit voice personal identification number (PIN) for disarming. Configure a 4 digit PIN in the Alexa app, or use an existing 4 digit PIN code configured for the alarm control panel.
To use the existing code configured for the alarm control panel the code must be 4 digits and the code_format attribute must be number. After discovery, the Alexa app will offer the ability to use the existing code, or create an additional 4 digit PIN to use with Alexa.
The existing code is never communicated to Alexa from Home Assistant. During disarming, Alexa will ask for a PIN. The PIN spoken to Alexa is relayed to Home Assistant and passed to the alarm_control_panel.alarm_disarm action. If the alarm_control_panel.alarm_disarm action fails for any reason, it is assumed the PIN was incorrect and reported to Alexa as an invalid PIN.
Turn on and off Alert, Automation, and Group entities as switches.
Requires Proactive Events enabled.
Binary Sensors with a device_class attribute of door garage_door opening window motion presense are supported.
device_class |
Alexa Sensor Type |
|---|---|
door |
Contact |
garage_door |
Contact |
opening |
Contact |
window |
Contact |
motion |
Motion |
presense |
Motion |
Ask Alexa for the state of a contact sensor.
Requires Proactive Events enabled.
Alexa Routines can be triggered with Binary Sensors exposed as contact or motion sensors.
Use the Entity Customization Tool to override the device_class attribute to expose a binary_sensor to Alexa.
Activate Buttons and Input Buttons with the button name, or “turn on” utterance. They will appear in the Alexa app as scenes.
Requires Proactive Events enabled.
Alexa Routines can be triggered when Buttons and Input Buttons are pressed.
In order to enable this, buttons will appear to have “presence detection” capability. This is what allows this functionality since Alexa does not support button type devices. To trigger a routine when a button is pressed, select the button in the when menu and then select the “Person” capability.
Requires Proactive Events enabled.
Note that Home Assistant can support a doorbell natively with an event entity with device_class to doorbell
Configure a binary_sensor with display_category of DOORBELL in the entity_config to gain access to the doorbell notification settings in the Alexa App. Note that Home Assistant can support this natively with an event entity.
alexa:
smart_home:
entity_config:
binary_sensor.alexa_doorbell:
name: "Front Door"
description: "Doorbell Binary Sensor"
display_categories: DOORBELLYAML
Alexa will announce on all echo devices “Someone is at the [entity name]” when a binary_sensor state changes from off to on.
See also Event entities.
Requires Proactive Events enabled.
Configure a binary_sensor that has a device_class attribute of motion or presence and configure display_category to CAMERA in the entity_config to gain access the presence detected notification settings in the Alexa App.
alexa:
smart_home:
entity_config:
binary_sensor.driveway_presence:
name: "Driveway"
description: "Driveway Presence Sensor"
display_categories: CAMERAYAML
Alexa will announce on all echo devices “Person detected at [entity name]”.
Important
Each Echo device will need the communication and Announcements setting enabled, and the Do Not Disturb feature turned off.
Image Processing entities also support this notification.
View a camera stream on an Amazon echo device.
The stream integration is required to stream cameras to Amazon echo devices.
The Amazon echo device will request the camera stream from Home Assistant. The Home Assistant URL must be accessible from the network the Amazon echo device is connected to and must support HTTPS on port 443 with a certificate signed by an Amazon approved certificate authority. These requirements can be satisfied with Home Assistant Cloud, or LetsEncrypt/DuckDNS.
Enable preload stream option for cameras used with echo devices to reduce response time, and prevent timing out before the 6 second limit.
Single, double, and triple set-point thermostats are supported. The temperature value from the thermostat will also be exposed at a separate temperature sensor.
“Alexa, set living room thermostat to automatic.”
DRY is shown in Alexa app as DEHUMIDIFY
ECO is handled as a preset in Home Assistant, and will not display in the Alexa app.
FAN_ONLY is not supported by the Alexa voice model and is shown as OFF in the Alexa App.
To change the thermostat mode, the exact utterance must be used:
If the climate entity supports on/off, use “turn on” and “turn off” utterances with the entity name or the mode utterance.
Alexa supports the following utterances value for climate thermostat mode:
| HA Climate Mode | Alexa Mode Utterances |
|---|---|
AUTO |
“auto”, “automatic” |
COOL |
“cool”, “cooling” |
HEAT |
“heat”, “heating” |
ECO |
“eco”, “economical” |
DRY |
“dry”, “dehumidify” |
OFF |
“off” |
Covers should be configured with the appropriate device_class.
Covers with a device_class of blind, shade, curtin are shown as an Interior Blind in the Alexa App and Covers with a window, awning, or shutter will show as an Exterior Blind.
Covers with the device_class of garage are shown as a Garage Door and support the Open by Voice PIN feature.
Use the Entity Customization Tool to override the device_class attribute to correctly expose a cover to Alexa.
Home Assistant configures covers with semantics that provide “raise”, “lower”, “open”, “close” utterances for covers. In addition to semantics “turn on” / “turn off” utterances will also work.
Semantics are assigned based on the features supported by the cover. If the cover supports tilt functionality, the semantics “open” and “close” are assigned to the tilt functionality, and the semantics “raise” and “lower” are assigned to the position functionality.
If the cover does not support tilt, all semantics “raise”, “lower”, “open”, “close” are assigned to the position functionality.
Covers that support a set position can be controlled using percentages.
| Locale | Friendly Name Synonyms |
|---|---|
en-US |
“position”, “opening” |
Currently, Alexa only supports friendly name synonyms for the en-US locale.
Covers that support tilt position can be controlled using percentages.
| Locale | Friendly Name Synonyms |
|---|---|
en-US |
“tilt”, “angle”, “direction” |
Currently, Alexa only supports friendly name synonyms for the en-US locale.
To stop the covers operation, say:
If your cover supports the STOP feature, this will stop the cover operation.
If your cover supports the STOP_TILT feature, this will stop the cover tilt operation.
If both features are enabled, both the cover and the cover tilt will be stopped.
Covers with a device_class of garage support the Open by Voice PIN feature in the Alexa app. Configure a 4 digit PIN code to open the garage door in the Alexa app.
Requires Proactive Events enabled.
Home Assistant event entities can trigger a doorbell announcement in Alexa if the device_class of the event entity is set to doorbell.
Alexa will announce on all echo devices “Someone is at the [entity name]” when an event entity has received an updated.
Note
Each Amazon Echo device will need the communication and announcements setting enabled and the Do Not Disturb feature turned off.
Control fan speed, direction, and oscillation.
The fan device must support percentage based speeds with the percentage attribute.
The fan device must support the preset_mode attribute.
Currently, Alexa only supports en-US locale for preset modes.
The fan device must support the direction attribute.
The fan device must support the oscillating attribute.
| Locale | Friendly Name Synonyms |
|---|---|
en-US |
“oscillate”, “swivel”, “oscillation”, “spin”, “back and forth” |
Currently, Alexa only supports friendly name synonyms for the en-US locale.
Control power, target humidity and mode.
The humidifier device must support the mode attribute.
Requires Proactive Events enabled.
All image_processing entities support the presence detected notification settings in the Alexa App. Any state change will trigger the notification.
Alexa will announce on all echo devices “Person detected at [entity name]”.
Note
Display category will default to CAMERA to enable presence detected notification settings in the Alexa App. Each Echo device will need the communication and Announcements setting enabled, and the Do Not Disturbed feature turned off.
Control an input_number or number entity with Alexa. Configures Alexa with the min, max, step, and unit_of_measurement attributes for the entity.
The following table lists the possible friendly name synonyms available for a Input Number or Number with min: -90, max: 90, step: 45, unit_of_measurement: degrees.
| Fan Range | Friendly Name Synonyms |
|---|---|
| -90 | “negative ninety”, “minimum”, “min” |
| -45 | “negative forty five” |
| 0 | “zero” |
| 45 | “forty five” |
| 90 | “ninety”, “maximum”, “max” |
The unit_of_measurement will be used to select a supported unit label from the Global Alexa catalog. If there is no match it will be assigned a preset controller.
The following units are supported: °C, °F, K, m, km, mi, yd, in, kg, g, oz, lb, L, ft³, m³, gal and %
Control lights with “turn on” and “turn off” utterances, adjust brightness, color, and temperature.
Lights that support brightness can be adjusted with percentages ranging from 0 to 100 percent.
The “dim” utterance will decrease the brightness of a light 25 percentage points.
Adjust lights that support color temperature using the following friendly names:
The following table lists the possible friendly name synonyms available to lights that support color temperature.
| Color Temperature in Kelvin | Friendly Name Synonyms |
|---|---|
| 2200 | “warm”, “warm white” |
| 2700 | “incandescent”, “soft white” |
| 4000 | “white” |
| 5500 | “daylight”, “daylight white” |
| 7000 | “cool”, “cool white” |
Use “warmer”, “softer”, “cooler, “whiter” utterances to adjust color temperature by 50 mired (approximately 300-500 degree kelvin change).
Set the light color using the CSS basic color keywords or extended color keywords as the friendly color name.
To unlock, Alexa will require a 4 digit voice personal identification number (PIN) for unlocking. Configure a 4 digit PIN in the Alexa app to unlock locks.
Supports changing the Media Player sound_mode from the preset sound_mode_list.
Alexa only supports the following modes: movie, music, night, sport, tv.
Supports changing the Media Player source from the preset source_list.
Home Assistant will attempt to translate the media_player source_list into a valid source name for Alexa. Alexa only supports the following input names:
AUX 1, AUX 2, AUX 3, AUX 4, AUX 5, AUX 6, AUX 7, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME, HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI 4, HDMI 5, HDMI 6, HDMI 7, HDMI 8, HDMI 9, HDMI 10, HDMI ARC, INPUT 1, INPUT 2, INPUT 3, INPUT 4, INPUT 5, INPUT 6, INPUT 7, INPUT 8, INPUT 9, INPUT 10, IPOD, LINE 1, LINE 2, LINE 3, LINE 4, LINE 5, LINE 6, LINE 7, MEDIA PLAYER, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3, PLAYSTATION 4, SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX
Requires Proactive Events enabled.
Note
Intents to seek forwards (skip) or to rewind (go back) are not supported at the moment.
Supports changing the Remote activity from the given activity_list
Note
Alexa does not allow the following words to be used as activity names:
alarm, alarms, all alarms, away mode, bass, camera, date, date today, day, do not disturb, drop in, music, night light, notification, playing, sleep sounds, time, timer, today in music, treble, volume, way f. m.
Activate scenes with scene name, or “turn on” utterance. Home Assistant does not support deactivate or “turn off” for scenes at this time.
Run script with script name, or “turn on” utterance. Deactivate a running script with “turn off” utterance.
Requires Proactive Events enabled.
Only temperature sensors are configured at this time.
Support “turn on” and “turn off” utterances.
Requires Proactive Events enabled.
Alexa Routines can be triggered when Switches and Input Booleans change state.
In order to enable this, Switches and Input Booleans will appear as contact sensors in the when menu of Alexa Routines. This is because Alexa does not support triggering routines from switch-type devices, only from contact and motion sensors. In this menu when you select a switch, Open corresponds to on and Close corresponds to off.
Start a timer with using the “turn on” utterance.
Cancel a timer using the “turn off” utterance.
Pause and Restart Timer entities in Home Assistant.
Important
To avoid issues with Alexa’s built-in timer functionality, the timer entity should not include the word “timer” in its friendly name.
Support “turn on” and “turn off” utterances. Pause and Resume
Valves are not supported natively within Alexa. So within Alexa, they are represented as a device of an unknown type.
Home Assistant configures valves with semantics that provide “open” and “close” utterances.
Valves that support a set position can be controlled using percentages.
| Locale | Friendly Name Synonyms |
|---|---|
en-US |
“position”, “opening” |
Currently, Alexa only supports friendly name synonyms for the en-US locale.
Valves that support stop closing or opening will have an extra toggle control that allows to stop the valve closing or opening operation.
Single, double, and triple set-point thermostats are supported. The temperature value from the thermostat will also be exposed at a separate temperature sensor.
You can ask Alexa about the current temperature and current target temperature.
The operation mode can be set from the UI. All Home Assistant operation modes can be set (English only).
To change the water heater’s mode, the exact utterance must be used:
If the water heater entity supports on/off, use “turn on” and “turn off” utterances with the entity name or the mode utterance.
Binary Sensors with a device_class attribute of door garage_door opening window motion presense are supported.
Use the Entity Customization Tool to override the device_class attribute to expose a binary_sensor to Alexa.
Disable and re-enable the skill using the Alexa App; then restart Home Assistant.
The Alexa integration will log additional information about state updates and other messages when the log level is set to debug. Add the relevant line below to the configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more]:
If using Alexa with an Alexa Smart Home Skill and Lambda function such as haaska:
logger:
default: info
logs:
homeassistant.components.alexa: debugYAML
If using Home Assistant Cloud you also need to debug hass_nubucasa.iot:
logger:
default: info
logs:
homeassistant.components.alexa: debug
hass_nabucasa.iot: debugYAML