File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,24 @@ def get_position_in_parent(self):
201
201
"""
202
202
return self .__index
203
203
204
+ def get_temperature (self ):
205
+ """
206
+ Retrieves current temperature reading from PSU
207
+ Returns:
208
+ A float number of current temperature in Celsius up to nearest thousandth
209
+ of one degree Celsius, e.g. 30.125
210
+ """
211
+ return self .get_thermal (0 ).get_temperature ()
212
+
213
+ def get_temperature_high_threshold (self ):
214
+ """
215
+ Retrieves the high threshold temperature of PSU
216
+ Returns:
217
+ A float number, the high threshold temperature of PSU in Celsius
218
+ up to nearest thousandth of one degree Celsius, e.g. 30.125
219
+ """
220
+ return self .get_thermal (0 ).get_high_threshold ()
221
+
204
222
@property
205
223
def _thermal_list (self ):
206
224
if self .__thermals is None :
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ def kv(line):
82
82
@classmethod
83
83
def __sensors_get (cls , cached = True ) -> dict :
84
84
cls .__lock .acquire ()
85
- if time .time () > cls .__timestamp + 5 :
86
- # Update cache once per 5 seconds
85
+ if time .time () > cls .__timestamp + 15 :
86
+ # Update cache once per 15 seconds
87
87
try :
88
88
data = platform_sensors_get (['-A' , '-u' ]) or ''
89
89
data += subprocess .check_output ("/usr/bin/sensors -A -u" ,
You can’t perform that action at this time.
0 commit comments