Mind the unit system (fixes #16819)

This commit is contained in:
Fabian Affolter 2018-09-24 19:52:13 +02:00
parent b52e8525ac
commit d421745cfc
No known key found for this signature in database
GPG key ID: E23CD2DD36A4397F

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