Skip to content
Snippets Groups Projects
Commit 30e99a5d authored by jkerdreu's avatar jkerdreu
Browse files

m/s => km/h

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1998 b32b6428-25c9-4566-ad07-03861ab6144f
parent 1e52f025
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,9 @@ class GW:
self.devs[0].attributes['temperature'] = round(weather.get_temperature(unit='celsius').get('temp',None),1)
self.devs[1].attributes['humidity'] = weather.get_humidity()
self.devs[2].attributes['pressure'] = weather.get_pressure().get('press',None)
self.devs[3].attributes['windStrength'] = weather.get_wind().get('speed',None)
wind = weather.get_wind().get('speed',None)
if wind: wind = wind * 3600 / 1000 # m/s => km/h
self.devs[3].attributes['windStrength'] = wind
self.devs[3].attributes['windAngle'] = weather.get_wind().get('deg',None)
def init(engine):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment