Merge pull request #174 from sapostoluk/main
Weather Module: Windspeed rounding and formatting fix
This commit is contained in:
commit
b1f2a43413
@ -442,11 +442,11 @@ class Weather(inkycal_module):
|
|||||||
|
|
||||||
if self.units == 'metric':
|
if self.units == 'metric':
|
||||||
logging.debug('getting windspeed in metric unit')
|
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':
|
elif self.units == 'imperial':
|
||||||
logging.debug('getting windspeed in imperial unit')
|
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)) + ' mph'
|
||||||
|
|
||||||
dec = decimal.Decimal
|
dec = decimal.Decimal
|
||||||
moonphase = get_moon_phase()
|
moonphase = get_moon_phase()
|
||||||
|
Loading…
Reference in New Issue
Block a user