Skip to content

Commit

Permalink
Temperature bug fixed.
Browse files Browse the repository at this point in the history
Now the temperature is posted ultimately in Celsius degree, despite DB format.
  • Loading branch information
sapegin-o1eg committed Nov 29, 2018
1 parent 3af9c37 commit 2c4aee0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/user/rp5.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import syslog
import weewx.restx
import urllib2
import weewx.units


# ============================================================================
Expand Down Expand Up @@ -81,9 +82,10 @@ def __init__(self, queue, manager_dict, api_key, server_url,
def format_url(self, incoming_record):
"""Return an URL for posting """

record = weewx.units.to_METRIC(incoming_record)
_liststr = ["api_key=%s" % self.api_key]
for _key in self._FORMATS:
_v = incoming_record.get(_key)
_v = record.get(_key)
if _v is not None:
_liststr.append(self._FORMATS[_key] % _v)
_urlquery = '&'.join(_liststr)
Expand Down
5 changes: 4 additions & 1 deletion changelog
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
v0.1 06nov2018
* Initial release
* Initial release

v0.2 29nov2018
* Temperature bug fixed

0 comments on commit 2c4aee0

Please sign in to comment.