Fix type of updated metric

This commit is contained in:
Robert Jacob 2020-07-03 16:46:05 +02:00
parent 6c3908e587
commit b794963127

View file

@ -201,7 +201,7 @@ func (c *NetatmoCollector) collectData(ch chan<- prometheus.Metric, device *neta
return return
} }
c.sendMetric(ch, updatedDesc, prometheus.CounterValue, float64(date.UTC().Unix()), moduleName, stationName) c.sendMetric(ch, updatedDesc, prometheus.GaugeValue, float64(date.UTC().Unix()), moduleName, stationName)
if data.Temperature != nil { if data.Temperature != nil {
c.sendMetric(ch, tempDesc, prometheus.GaugeValue, float64(*data.Temperature), moduleName, stationName) c.sendMetric(ch, tempDesc, prometheus.GaugeValue, float64(*data.Temperature), moduleName, stationName)