Audi: fix outside temperature
This commit is contained in:
parent
e16c52514d
commit
4378f4ec78
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue