Fix OWM async I/O (#4298)

This commit is contained in:
Lewis Juggins 2016-11-09 02:57:56 +00:00 committed by Paulus Schoutsen
parent 114ece1848
commit 67b599475e

View file

@ -67,7 +67,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
data = WeatherData(owm, latitude, longitude)
add_devices([OpenWeatherMapWeather(
name, data, hass.config.units.temperature_unit)])
name, data, hass.config.units.temperature_unit)], True)
class OpenWeatherMapWeather(WeatherEntity):
@ -78,8 +78,7 @@ class OpenWeatherMapWeather(WeatherEntity):
self._name = name
self._owm = owm
self._temperature_unit = temperature_unit
self.date = None
self.update()
self.data = None
@property
def name(self):