Skip to content

Commit 3ccab75

Browse files
committed
Correct returning timestamp as gust bug
1 parent f675f11 commit 3ccab75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WeatherStationCoreLink/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def looprequest():
108108
data["timestamp"] = round(time.time(),0)
109109

110110
windSpeeds[str(int(round(time.time())))] = data["windSpeed"] #add this data point to the gust speeds list
111-
data["wind10MinGust"] = max(windSpeeds, key=windSpeeds.get)
111+
data["wind10MinGust"] = max(windSpeeds.values()) #Return the largest value in the dictionary
112112
except Exception as e:
113113
log("[ERROR] Ignoring data because of error: " + str(e))
114114
errorcount = errorcount + 1

0 commit comments

Comments
 (0)