From cfa34c89e103a3d6528323bec38bbe873cc7fb57 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 20 Feb 2019 13:43:19 -0800 Subject: [PATCH] Fix for HA 0.88.0 architecture change (#77) --- media_player/alexa.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/media_player/alexa.py b/media_player/alexa.py index b15729cd..68d4abfd 100644 --- a/media_player/alexa.py +++ b/media_player/alexa.py @@ -3,7 +3,7 @@ For more details about this platform, please refer to the documentation at https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639 -VERSION 0.10.1 +VERSION 0.10.2 """ import logging @@ -14,11 +14,13 @@ from homeassistant import util from homeassistant.components.media_player import ( - MEDIA_TYPE_MUSIC, PLATFORM_SCHEMA, SUPPORT_NEXT_TRACK, + MediaPlayerDevice, MEDIA_PLAYER_SCHEMA, PLATFORM_SCHEMA) +from homeassistant.components.media_player.const import ( + MEDIA_TYPE_MUSIC, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PREVIOUS_TRACK, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_VOLUME_MUTE, SUPPORT_PLAY_MEDIA, SUPPORT_VOLUME_SET, - MediaPlayerDevice, DOMAIN, MEDIA_PLAYER_SCHEMA, + DOMAIN, SUPPORT_SELECT_SOURCE) from homeassistant.const import ( CONF_EMAIL, CONF_PASSWORD, CONF_URL, @@ -281,7 +283,7 @@ def __init__(self, config, session, device, update_devices, url, self.auth = authentication self.alexa_api_session = session self.alexa_api_url = url - + # Logged in info self._authenticated = None self._can_access_prime_music = None @@ -1157,4 +1159,3 @@ def get_authentication(url, session): _LOGGER.error("An error occured accessing the API: {}".format( message)) return None -