feat(weather): log temperature and station type on data report push

This commit is contained in:
Adriano Caloiaro 2026-04-11 12:42:06 -06:00
parent ef7c36af37
commit 5dae01b00f
No known key found for this signature in database

View file

@ -80,6 +80,13 @@ func Listen(getLocation func() (lat, lon float64, name string, ok bool), wCache
}
}
wCache.Update(r)
if data, ok := wCache.Get(); ok {
tempStr := "n/a"
if data.TempF != nil {
tempStr = fmt.Sprintf("%.1f°F", *data.TempF)
}
log.Printf("weather update received: temp=%s station=%s", tempStr, data.StationType)
}
w.WriteHeader(http.StatusOK)
})