Round humidity for display purposes (#12766)
Humidity was not being rounded as temperature was. This change fixes that.
This commit is contained in:
1 parent
9658f4383c
commit
e82b358831
3 files changed
+12
-8
No files matched your search
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user