Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Entities/Sensors/BatterySensor/BatterySensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def Initialize(self):
def PostInitialize(self):
# Check if battery infomration are present
if not psutil.sensors_battery():
raise("No battery sensor for this host")
raise Exception("No battery sensor for this host")

def Update(self):
batteryInfo = self.GetBatteryInformation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def GetCpuTemperature_Unix(self):
elif 'cpu_thermal' in temps:
for temp in temps['cpu_thermal']:
return temp.current
elif 'nvme' in temps:
for temp in temps['nvme']:
if 'Composite' in temp.label:
return temp.current
else:
self.Log(Logger.LOG_ERROR, "Can't get temperature for your system.")
self.Log(Logger.LOG_ERROR,
Expand Down