Skip to content

Commit e09d6a8

Browse files
committed
Add get_temperature_fahrenheit for the Americans.
1 parent 8036488 commit e09d6a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xbee_helper/device.py

+7
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,10 @@ def get_temperature(self, dest_addr_long=None):
257257
"""
258258
return hex_to_int(self._get_parameter(
259259
b"TP", dest_addr_long=dest_addr_long))
260+
261+
def get_temperature_fahrenheit(self, dest_addr_long=None):
262+
"""
263+
Fetches and returns the degrees Fahrenheit value measured by the XBee
264+
Pro module.
265+
"""
266+
return ((self.get_temperature(dest_addr_long) * 9) / 5) + 32

0 commit comments

Comments
 (0)