Skip to content

Commit

Permalink
Merge branch 'master' of github.com:garbled1/pyecowitt
Browse files Browse the repository at this point in the history
  • Loading branch information
garbled1 committed Jul 18, 2020
2 parents 79dba37 + 82b79bb commit ff11560
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pyecowitt/ecowitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ def convert_units(self, data):
data["windchillf"] = self._wind_chill(data["tempf"],
data["windspeedmph"])
data["windchillc"] = self._ftoc(data["windchillf"])
if "tempc" in data and "humidity" in data:
data["dewpointc"] = self.get_dew_point_c(data["tempc"],
data["humidity"])
data["dewpointf"] = round((data["dewpointc"] * 9.0 / 5.0) + 32.0, 2)
for j in ['', 'in', '1', '2', '3', '4', '5', '6', '7', '8']:
if "temp" + j + "c" in data and "humidity" + j in data:
data["dewpoint" + j + "c"] = self.get_dew_point_c(data["temp" + j + "c"],
data["humidity" + j])
data["dewpoint" + j + "f"] = round((data["dewpoint" + j + "c"] * 9.0 / 5.0) + 32.0, 2)

# Soil moisture (WH51)
for j in range(1, 9):
Expand Down

0 comments on commit ff11560

Please sign in to comment.