mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
new yahooweather version and fix update function (#2848)
This commit is contained in:
parent
848781fbb7
commit
4a847dbd91
@ -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"]
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user