new yahooweather version and fix update function (#2848)

This commit is contained in:
Pascal Vizeli 2016-08-17 07:40:20 +02:00 committed by Paulus Schoutsen
parent 848781fbb7
commit 4a847dbd91
2 changed files with 5 additions and 2 deletions

View File

@ -13,7 +13,7 @@ from homeassistant.const import (CONF_PLATFORM, TEMP_CELSIUS,
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
REQUIREMENTS = ["yahooweather==0.6"]
REQUIREMENTS = ["yahooweather==0.7"]
SENSOR_TYPES = {
'weather_current': ['Current', None],
@ -139,6 +139,9 @@ class YahooWeatherSensor(Entity):
def update(self):
"""Get the latest data from Yahoo! and updates the states."""
self._data.update()
if not self._data.yahoo.RawData:
_LOGGER.info("Don't receive weather data from yahoo!")
return
# default code for weather image
self._code = self._data.yahoo.Now["code"]

View File

@ -473,7 +473,7 @@ xbee-helper==0.0.7
xmltodict==0.10.2
# homeassistant.components.sensor.yweather
yahooweather==0.6
yahooweather==0.7
# homeassistant.components.zeroconf
zeroconf==0.17.6