mirror of
https://github.com/steinhobelgruen/netatmo-exporter.git
synced 2024-11-25 02:33:56 +00:00
Update code for fixed upstream typo. Fixes #2.
This commit is contained in:
parent
4dcd2552d2
commit
6de7730584
|
@ -95,11 +95,11 @@ func collectData(ch chan<- prometheus.Metric, device *netatmo.Device) {
|
||||||
moduleName := device.ModuleName
|
moduleName := device.ModuleName
|
||||||
data := device.DashboardData
|
data := device.DashboardData
|
||||||
|
|
||||||
if data.LastMesure == nil {
|
if data.LastMeasure == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
date := time.Unix(*data.LastMesure, 0)
|
date := time.Unix(*data.LastMeasure, 0)
|
||||||
if time.Since(date) > staleDataThreshold {
|
if time.Since(date) > staleDataThreshold {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue