We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 909e6e7 commit 4f64118Copy full SHA for 4f64118
1 file changed
allsky_pistatus/allsky_pistatus.py
@@ -85,7 +85,18 @@ def pistatus(params, event):
85
86
vcgm = Vcgencmd()
87
temp = vcgm.measure_temp()
88
- data['AS_CPUTEMP'] = str(temp)
+ temp = round(temp,1)
89
+ tempUnits = s.getSetting("temptype")
90
+ if tempUnits == 'B':
91
+ data['AS_CPUTEMP_C'] = str(temp)
92
+ temp = (temp * (9/5)) + 32
93
94
+ data['AS_CPUTEMP_F'] = str(temp)
95
+ else:
96
+ if tempUnits == 'F':
97
98
99
+ data['AS_CPUTEMP'] = str(temp)
100
101
throttled = vcgm.get_throttled()
102
data['AS_THROTTLEDBINARY'] = str(throttled['raw_data'])
0 commit comments