From da61b18392d37bf0800280ad90e9a0dded36e006 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 4 Jul 2017 10:07:06 +0200 Subject: [PATCH] Partially revert #7931 (#8326) --- homeassistant/components/sensor/yweather.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/yweather.py b/homeassistant/components/sensor/yweather.py index 4919d75e8da..2883a396b77 100644 --- a/homeassistant/components/sensor/yweather.py +++ b/homeassistant/components/sensor/yweather.py @@ -15,6 +15,7 @@ from homeassistant.const import ( TEMP_CELSIUS, CONF_MONITORED_CONDITIONS, CONF_NAME, STATE_UNKNOWN, ATTR_ATTRIBUTION) from homeassistant.helpers.entity import Entity +from homeassistant.util import Throttle REQUIREMENTS = ['yahooweather==0.8'] @@ -26,7 +27,7 @@ CONF_WOEID = 'woeid' DEFAULT_NAME = 'Yweather' -SCAN_INTERVAL = timedelta(minutes=10) +MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=10) SENSOR_TYPES = { 'weather_current': ['Current', None], @@ -181,6 +182,7 @@ class YahooWeatherData(object): """Return Yahoo! API object.""" return self._yahoo + @Throttle(MIN_TIME_BETWEEN_UPDATES) def update(self): """Get the latest data from Yahoo!.""" return self._yahoo.updateWeather()