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
parent
93689d68f7
commit
58c7ee649d
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue