Round humidity for display purposes (#12766)

Humidity was not being rounded as temperature was. This change fixes
that.
This commit is contained in:
Philip Rosenberg-Watt authored and Paulus Schoutsen committed 2018-02-28 10:59:47 -08:00
1 parent 9658f4383c
commit e82b358831
3 files changed
+12 -8

No files matched your search

+1 -1
View File
@@ -110,7 +110,7 @@ class WeatherEntity(Entity):
ATTR_WEATHER_TEMPERATURE: show_temp(
self.hass, self.temperature, self.temperature_unit,
self.precision),
ATTR_WEATHER_HUMIDITY: self.humidity,
ATTR_WEATHER_HUMIDITY: round(self.humidity)
}
ozone = self.ozone
+1 -1
View File
@@ -96,7 +96,7 @@ class DarkSkyWeather(WeatherEntity):
@property
def humidity(self):
"""Return the humidity."""
return round(self._ds_currently.get('humidity') * 100.0, 2)
return self._ds_currently.get('humidity') * 100.0
@property
def wind_speed(self):