Mind the unit system (fixes #16819)
This commit is contained in:
parent
b52e8525ac
commit
d421745cfc
1 changed files with 3 additions and 0 deletions
|
@ -130,6 +130,9 @@ class OpenWeatherMapWeather(WeatherEntity):
|
||||||
@property
|
@property
|
||||||
def wind_speed(self):
|
def wind_speed(self):
|
||||||
"""Return the wind speed."""
|
"""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)
|
return round(self.data.get_wind().get('speed') * 3.6, 2)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue