Skip to content

Commit

Permalink
Merge pull request #394 from AnalogJ/skip_null_temp
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Nov 15, 2022
2 parents 098ce06 + 2677796 commit 075eb94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ func (sr *scrutinyRepository) SaveSmartTemperature(ctx context.Context, wwn stri
if len(collectorSmartData.AtaSctTemperatureHistory.Table) > 0 {

for ndx, temp := range collectorSmartData.AtaSctTemperatureHistory.Table {
//temp value may be null, we must skip/ignore them. See #393
if temp == 0 {
continue
}

minutesOffset := collectorSmartData.AtaSctTemperatureHistory.LoggingIntervalMinutes * int64(ndx) * 60
smartTemp := measurements.SmartTemperature{
Expand Down

0 comments on commit 075eb94

Please sign in to comment.