Mind the unit system (fixes #16819) (#16823)

This commit is contained in:
Fabian Affolter 2018-10-01 20:38:41 +02:00 committed by Paulus Schoutsen
parent b0c1c37cd5
commit a148f3e2a9

View File

@ -130,6 +130,9 @@ class OpenWeatherMapWeather(WeatherEntity):
@property
def wind_speed(self):
"""Return the wind speed."""
if self.hass.config.units.name == 'imperial':
return round(self.data.get_wind().get('speed') * 2.24, 2)
return round(self.data.get_wind().get('speed') * 3.6, 2)
@property