Skip to content

Commit

Permalink
Return float consistently for #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Feb 18, 2022
1 parent 57f7ce1 commit 1329b60
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions library/weatherhat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ def __init__(self):

# Data API... kinda
self.temperature_offset = -7.5
self.device_temperature = 0
self.temperature = 0
self.device_temperature = 0.0
self.temperature = 0.0

self.pressure = 0
self.pressure = 0.0

self.humidity = 0
self.relative_humidity = 0
self.dewpoint = 0
self.humidity = 0.0
self.relative_humidity = 0.0
self.dewpoint = 0.0

self.lux = 0
self.lux = 0.0

self.wind_speed = 0
self.wind_direction = 0
self.wind_speed = 0.0
self.wind_direction = 0.0

self.rain = 0
self.rain_total = 0
self.rain = 0.0
self.rain_total = 0.0

self.reset_counts()

Expand Down Expand Up @@ -138,7 +138,7 @@ def degrees_to_cardinal(self, degrees):

def update(self, interval=60.0):
# Time elapsed since last update
delta = time.time() - self._t_start
delta = float(time.time() - self._t_start)

self.updated_wind_rain = False

Expand Down

0 comments on commit 1329b60

Please sign in to comment.