Merge branch 'master' of git://github.com/topshed/enviroplus-python into topshed...
authorPhil Howard <phil@gadgetoid.com>
Tue, 20 Aug 2019 15:08:53 +0000 (16:08 +0100)
committerPhil Howard <phil@gadgetoid.com>
Tue, 20 Aug 2019 15:08:53 +0000 (16:08 +0100)
examples/all-in-one-no-pm.py
examples/all-in-one.py
examples/luftdaten.py

index 367ebeb0854926c4ad5bf6d145444c85b3a18172..bc19e123d5b7ea175623137f03fa3d13f0c34049 100755 (executable)
@@ -80,6 +80,7 @@ def display_text(variable, data, unit):
 def get_cpu_temperature():
     process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
     output, _error = process.communicate()
+    output = output.decode()
     return float(output[output.index('=') + 1:output.rindex("'")])
 
 
index 8ba76815b25347a48d70f8d3d26dfdcdf90b319e..695a007e0d33a538fa9f3ca1efc9dbeb90ac45e8 100755 (executable)
@@ -86,6 +86,7 @@ def display_text(variable, data, unit):
 def get_cpu_temperature():
     process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
     output, _error = process.communicate()
+    output = output.decode()
     return float(output[output.index('=') + 1:output.rindex("'")])
 
 
index 27478c590c06088cea81334723a92417de559359..77a6d820d70e327d7affc3ed5f4a887eab19ba02 100755 (executable)
@@ -74,6 +74,7 @@ def read_values():
 def get_cpu_temperature():
     process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
     output, _error = process.communicate()
+    output = output.decode()
     return float(output[output.index('=') + 1:output.rindex("'")])