From 58c7ee649d3a22c44ac98012b1c0ffa03557cb3d Mon Sep 17 00:00:00 2001 From: Oleksii Serdiuk Date: Fri, 2 Nov 2018 13:44:53 +0100 Subject: [PATCH] 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`. --- homeassistant/components/sensor/darksky.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/sensor/darksky.py b/homeassistant/components/sensor/darksky.py index a43ab888d04..9a3ba45dfa1 100644 --- a/homeassistant/components/sensor/darksky.py +++ b/homeassistant/components/sensor/darksky.py @@ -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