Implemented wind speed rounding for non-beaufort units, as the round_windspeed option previously didn't actually round the windspeed
This commit is contained in:
parent
30a6f6499e
commit
af1e7e05c1
@ -442,11 +442,11 @@ class Weather(inkycal_module):
|
||||
|
||||
if self.units == 'metric':
|
||||
logging.debug('getting windspeed in metric unit')
|
||||
wind = str(weather.wind(unit='meters_sec')['speed']) + 'm/s'
|
||||
wind = str(round(weather.wind(unit='meters_sec')['speed']), ndigits=dec_wind) + 'm/s'
|
||||
|
||||
elif self.units == 'imperial':
|
||||
logging.debug('getting windspeed in imperial unit')
|
||||
wind = str(weather.wind(unit='miles_hour')['speed']) + 'miles/h'
|
||||
wind = str(round(weather.wind(unit='miles_hour')['speed']), ndigits=dec_wind) + 'miles/h'
|
||||
|
||||
dec = decimal.Decimal
|
||||
moonphase = get_moon_phase()
|
||||
|
Loading…
Reference in New Issue
Block a user