diff --git a/homeassistant/components/sensor/lastfm.py b/homeassistant/components/sensor/lastfm.py index 2579ffc68bdb7668122772b30f52d2a6f1469a47..76a40354829a18ce014a1a192330650dfde22001 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 ccfe28ab991d83a41051f39c674bef7c1f1650ff..162748cc8b4e0eac21a3c54eeccf3c7155d95c7d 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