Audi: fix outside temperature

This commit is contained in:
andig 2022-06-12 13:47:19 +02:00
parent e16c52514d
commit 4378f4ec78

View file

@ -147,5 +147,9 @@ func (t *TimedTemperature) UnmarshalJSON(data []byte) error {
// temp2Float converts api temp to float value
func temp2Float(i int) float64 {
return float64(i)/10 - 273
f := float64(i)
if f == 0 {
return math.NaN()
}
return f/10 - 273
}