Alexa Media Player Custom Component for homeassistant
This is a custom component to allow control of Amazon Alexa devices in Homeassistant using the unofficial Alexa API. Please note this mimics the Alexa app but Amazon may cut off access at anytime.
Allows for control of Amazon Echo products as home assistant media devices with the following features:
- Play/Pause/Stop
- Next/Previous (Track)
- Volume
- Retrieval for displaying in home assistant of:
- Song Title
- Artists Name
- Album Name
- Album Image
Please see the wiki.
We can basically do anything a Alexa Routine can do. You'll have to discover specifics, but here are some examples (and please help add them below!).
To play music using the media_player.play_media
service, you have to define the media_content_type appropriately. Search the forum for other examples.
Please see Notification Component for TTS, announcements, or mobile push. Please note we do not support the the Media Player UI for TTS!
Additional attribute to tell you if the Alexa device is online (extremely useful if you want to send a TTS after one has come back online (such as one in a vehicle)
Each device will report whether it is the last_called
or not. This allows us to identify the device that was called according to the Alexa Activities API.
Alexa accepts certain pre-defined sequences and this is what provides TTS and play_media. This is now exposed through the media_player.play_media service
when the media_content_type
is set to sequence
Supported sequences (may be region specific):
- Alexa.Weather.Play
- Alexa.Traffic.Play
- Alexa.FlashBriefing.Play
- Alexa.GoodMorning.Play
- Alexa.GoodNight.Play
- Alexa.SingASong.Play
- Alexa.TellStory.Play
- Alexa.FunFact.Play
- Alexa.Joke.Play
- Alexa.Music.PlaySearchPhrase
- Alexa.Calendar.PlayTomorrow
- Alexa.Calendar.PlayToday
- Alexa.Calendar.PlayNext
- Alexa.CleanUp.Play
- Alexa.ImHome.Play
Running Alexa automation routines is now supported. Routines are tasks you can trigger through the Alexa App.
Please create them using the Alexa app and ensure they are enabled. This is now exposed through the media_player.play_media service when the media_content_type
is set to routine
We also support HACS. This cannot be used with custom_updater.
In order to find Alexa Media Player, you first need to add the repository:
- Open HACS
- Go to Settings
- Enter
https://github.com/keatontaylor/alexa_media_player
in ADD CUSTOM REPOSITORY. Select typeintegration
.
Arm and disarm Alexa guard mode using an Alarm Control Panel. To arm, use ARM_AWAY
. ARM_HOME
is the same as DISARM
. Please ensure you've enabled through the Alexa app.
We do not support any Guard notifications at the moment.
Please see Notification Component.
Please see the wiki
Use the commit history but we try to maintain this wiki.
Apache-2.0. By providing a contribution, you agree the contribution is licensed under Apache-2.0. This is required for Home Assistant contributions.