diff --git a/pkg/temperature/ds18b20.go b/pkg/temperature/ds18b20.go index 85829e4..cbe5115 100644 --- a/pkg/temperature/ds18b20.go +++ b/pkg/temperature/ds18b20.go @@ -223,12 +223,12 @@ func read(sensor string) (int64, error) { raw := string(data) if !strings.Contains(raw, " YES") { - return 0.0, fmt.Errorf("%w: checksum failed", ErrReadSensor) + return 0.0, fmt.Errorf("%w: checksum failed [%v]", ErrReadSensor, raw) } i := strings.LastIndex(raw, "t=") if i == -1 { - return 0.0, fmt.Errorf("%w: t= not found", ErrReadSensor) + return 0.0, fmt.Errorf("%w: t= not found in [%v]", ErrReadSensor, raw) } c, err := strconv.ParseInt(raw[i+2:len(raw)-1], 10, 64)