Skip to content

Commit

Permalink
fixing bug. Null value for temperatures should be ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Nov 6, 2022
1 parent 5cc7fb3 commit 2677796
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 2677796

Please sign in to comment.