From c11b6798dccdaa2616afcf9b18c2a3278e52bba3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Sun, 6 Aug 2017 10:08:45 +0200 Subject: [PATCH] Upgrade pylast to 1.9.0 (#8854) --- homeassistant/components/sensor/lastfm.py | 9 +++------ requirements_all.txt | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/sensor/lastfm.py b/homeassistant/components/sensor/lastfm.py index 2579ffc68bd..76a40354829 100644 --- a/homeassistant/components/sensor/lastfm.py +++ b/homeassistant/components/sensor/lastfm.py @@ -13,7 +13,7 @@ from homeassistant.helpers.entity import Entity from homeassistant.const import CONF_API_KEY import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pylast==1.8.0'] +REQUIREMENTS = ['pylast==1.9.0'] ATTR_LAST_PLAYED = 'last_played' ATTR_PLAY_COUNT = 'play_count' @@ -25,8 +25,7 @@ ICON = 'mdi:lastfm' PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONF_API_KEY): cv.string, - vol.Required(CONF_USERS, default=[]): - vol.All(cv.ensure_list, [cv.string]), + vol.Required(CONF_USERS, default=[]): vol.All(cv.ensure_list, [cv.string]), }) @@ -38,8 +37,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices( [LastfmSensor( - username, network) for username in config.get(CONF_USERS)] - ) + username, network) for username in config.get(CONF_USERS)], True) class LastfmSensor(Entity): @@ -55,7 +53,6 @@ class LastfmSensor(Entity): self._lastplayed = None self._topplayed = None self._cover = None - self.update() @property def name(self): diff --git a/requirements_all.txt b/requirements_all.txt index ccfe28ab991..162748cc8b4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -612,7 +612,7 @@ pykira==0.1.1 pykwb==0.0.8 # homeassistant.components.sensor.lastfm -pylast==1.8.0 +pylast==1.9.0 # homeassistant.components.media_player.webostv # homeassistant.components.notify.webostv -- GitLab