diff --git a/README.md b/README.md index 24796ab2..70259f36 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Community post: https://community.home-assistant.io/t/spotcast-custom-component- _Now with support for speaker groups, transferring playback to and between chromecast devices and using HA entity id instead of device_name_. ***Important*** -Release 2.2 Uses a quick fix for getting the spotify webplayer token. Release 2.1 requires Home Assistant 0.99 due to update in pychromecast version. As of release 2 the sensor is optional. To add it add it to the configs sensor section. diff --git a/custom_components/spotcast/__init__.py b/custom_components/spotcast/__init__.py index 2849726f..82b343f5 100644 --- a/custom_components/spotcast/__init__.py +++ b/custom_components/spotcast/__init__.py @@ -7,7 +7,7 @@ import random import time -_VERSION = '2.3.0' +_VERSION = '2.4.0' DOMAIN = 'spotcast' _LOGGER = logging.getLogger(__name__) @@ -82,8 +82,8 @@ def get_chromecast_device(device_name): raise HomeAssistantError('Could not find device with name {}'.format(device_name)) def get_spotify_token(username, password): - from .spotify_token import start_session - data = start_session(username, password) + import spotify_token as st + data = st.start_session(username, password) access_token = data[0] expires = data[1] - int(time.time()) return access_token, expires diff --git a/custom_components/spotcast/manifest.json b/custom_components/spotcast/manifest.json index 1d8f6299..24603f4a 100644 --- a/custom_components/spotcast/manifest.json +++ b/custom_components/spotcast/manifest.json @@ -5,8 +5,7 @@ "requirements": [ "fondberg-spotipy==2.4.5-dev2", "pychromecast==4.0.1", - "beautifulsoup4==4.8.0", - "lxml==4.4.1" + "spotify_token==0.1.1" ], "homeassistant": "0.99.0", "dependencies": [