From 1a34bc53015a2e9052ed5701aef48c2a4e11a44a Mon Sep 17 00:00:00 2001 From: arsaboo Date: Wed, 17 Aug 2016 16:31:36 -0400 Subject: [PATCH] Removed lynting issues --- homeassistant/components/sensor/wunderground.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/sensor/wunderground.py b/homeassistant/components/sensor/wunderground.py index ab0727775ce..ebafca9768e 100644 --- a/homeassistant/components/sensor/wunderground.py +++ b/homeassistant/components/sensor/wunderground.py @@ -1,4 +1,4 @@ -"""Support for Wunderground weather service.""" +"""Support for Wunderground weather service. from datetime import timedelta import logging import requests @@ -90,15 +90,15 @@ class WUndergroundSensor(Entity): @property def state(self): """Return the state of the sensor.""" - self.weather = self.rest.data - return self.weather[str(self._condition)] + value = self.rest.data + return value[str(self._condition)] @property def entity_picture(self): """Return the entity picture.""" - self.weather = self.rest.data + value = self.rest.data if self._condition == 'weather': - return self.weather['icon_url'] + return value['icon_url'] @property def unit_of_measurement(self): @@ -114,7 +114,7 @@ class WUndergroundSensor(Entity): class WUndergroundData(object): - """Get data from Wunderground.""" + """Get data from Wundeground.""" def __init__(self, resource, pws_id, api_key, data): """Initialize the data object.""" @@ -129,7 +129,7 @@ class WUndergroundData(object): """Get the latest data from wunderground""" try: result = requests.get(self._resource + self._api_key + - '/conditions/q/pws:' + self._pws_id + + '/conditions/q/pws:' + self._pws_id + '.json', timeout=10) if "error" in result.json(): raise ValueError(result.json()["response"]["error"]