Skip to content

Commit

Permalink
Fix CPU temp indicator. #238
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Jan 13, 2019
1 parent 8d5934a commit bb21de7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions terrariumEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,12 @@ def get_system_stats(self, socket = False):
'temperature' : cpu_temp,
'external_calendar_url': self.config.get_external_calender_url()}

indicator = self.__unit_type('temperature').lower()
if 'f' == indicator:
data['temperature'] = terrariumUtils.to_fahrenheit(data['temperature'])
elif 'k' == indicator:
data['temperature'] = terrariumUtils.to_kelvin(data['temperature'])

if socket:
gauge_data = {'system_load' : {'current' : data['load']['load1'] * 100, 'alarm_min' : 0, 'alarm_max': 80, 'limit_min' : 0, 'limit_max': 100, 'cores' : data['cores']},
'system_temperature' : {'current' : data['temperature'], 'alarm_min' : 30, 'alarm_max': 60, 'limit_min' : 0, 'limit_max': 80},
Expand Down

0 comments on commit bb21de7

Please sign in to comment.