2021-09-30 18:36:41 +00:00
|
|
|
package temperature
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type TemperatureReading struct {
|
2022-02-18 20:59:32 +00:00
|
|
|
Sensor string `json:"sensor"`
|
|
|
|
Time time.Time `json:"time"`
|
|
|
|
MilliDegrees int64 `json:"milli_degrees"`
|
2021-09-30 18:36:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (t *TemperatureReading) Degrees() float64 {
|
|
|
|
return float64(t.MilliDegrees) / 1000.0
|
|
|
|
}
|