diff --git a/Entities/Sensors/BatterySensor/BatterySensor.py b/Entities/Sensors/BatterySensor/BatterySensor.py index 90f366d..3a6947a 100644 --- a/Entities/Sensors/BatterySensor/BatterySensor.py +++ b/Entities/Sensors/BatterySensor/BatterySensor.py @@ -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() diff --git a/Entities/Sensors/CpuTemperaturesSensor/CpuTemperaturesSensor.py b/Entities/Sensors/CpuTemperaturesSensor/CpuTemperaturesSensor.py index a443698..18bc266 100644 --- a/Entities/Sensors/CpuTemperaturesSensor/CpuTemperaturesSensor.py +++ b/Entities/Sensors/CpuTemperaturesSensor/CpuTemperaturesSensor.py @@ -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,