Skip to content

Commit

Permalink
getSmartData(...) temperature is undefined UshakovVasilii#209 this w…
Browse files Browse the repository at this point in the history
…ill ignore any drive without a temperature.
  • Loading branch information
steveip committed Mar 25, 2024
1 parent 04de227 commit 96868b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export default class SmartctlUtil {
if (attributes["smartctl"]["exit_status"] != 0)
return null;

if(!attributes.temperature) {
return null;
}

return {
label: info["model_name"],
temp: parseFloat(attributes.temperature.current)
Expand Down

0 comments on commit 96868b1

Please sign in to comment.