Darksky: Round all temperatures to 1 decimal place (#18119)

Some temperatures were not rounded to 1 decimal place:
`temperature_low`, `apparent_temperature_low`, `temperature_high`,
`apparent_temperature_high`.
pull/18123/head
Oleksii Serdiuk 2018-11-02 13:44:53 +01:00 committed by Fabian Affolter
parent 93689d68f7
commit 58c7ee649d
1 changed files with 6 additions and 4 deletions

View File

@ -354,10 +354,12 @@ class DarkSkySensor(Entity):
if self.type in ['precip_probability', 'cloud_cover', 'humidity']:
return round(state * 100, 1)
if self.type in ['dew_point', 'temperature', 'apparent_temperature',
'temperature_min', 'temperature_max',
'apparent_temperature_min',
'apparent_temperature_max', 'precip_accumulation',
'pressure', 'ozone', 'uvIndex']:
'temperature_low', 'apparent_temperature_low',
'temperature_min', 'apparent_temperature_min',
'temperature_high', 'apparent_temperature_high',
'temperature_max', 'apparent_temperature_max'
'precip_accumulation', 'pressure', 'ozone',
'uvIndex']:
return round(state, 1)
return state