Remove scale calculation for climacell cloud cover (#52752)

This commit is contained in:
apaperclip 2021-07-08 12:10:05 -04:00 committed by GitHub
parent eb735b6162
commit 49181d6ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 6 deletions

View file

@ -214,7 +214,6 @@ CC_SENSOR_TYPES = [
ATTR_FIELD: CC_ATTR_CLOUD_COVER,
ATTR_NAME: "Cloud Cover",
CONF_UNIT_OF_MEASUREMENT: PERCENTAGE,
ATTR_SCALE: 1 / 100,
},
{
ATTR_FIELD: CC_ATTR_WIND_GUST,

View file

@ -207,8 +207,6 @@ class BaseClimaCellWeatherEntity(ClimaCellEntity, WeatherEntity):
distance_convert(self.wind_gust, LENGTH_MILES, LENGTH_KILOMETERS), 4
)
cloud_cover = self.cloud_cover
if cloud_cover is not None:
cloud_cover /= 100
return {
ATTR_CLOUD_COVER: cloud_cover,
ATTR_WIND_GUST: wind_gust,

View file

@ -182,7 +182,7 @@ async def test_v4_sensor(
check_sensor_state(hass, PRESSURE_SURFACE_LEVEL, "997.9688")
check_sensor_state(hass, GHI, "0.0")
check_sensor_state(hass, CLOUD_BASE, "1.1909")
check_sensor_state(hass, CLOUD_COVER, "1.0")
check_sensor_state(hass, CLOUD_COVER, "100")
check_sensor_state(hass, CLOUD_CEILING, "1.1909")
check_sensor_state(hass, WIND_GUST, "5.6506")
check_sensor_state(hass, PRECIPITATION_TYPE, "rain")

View file

@ -228,7 +228,7 @@ async def test_v3_weather(
assert weather_state.attributes[ATTR_WEATHER_VISIBILITY] == 9.9940
assert weather_state.attributes[ATTR_WEATHER_WIND_BEARING] == 320.31
assert weather_state.attributes[ATTR_WEATHER_WIND_SPEED] == 14.6289
assert weather_state.attributes[ATTR_CLOUD_COVER] == 1
assert weather_state.attributes[ATTR_CLOUD_COVER] == 100
assert weather_state.attributes[ATTR_WIND_GUST] == 24.0758
assert weather_state.attributes[ATTR_PRECIPITATION_TYPE] == "rain"
@ -391,6 +391,6 @@ async def test_v4_weather(
assert weather_state.attributes[ATTR_WEATHER_VISIBILITY] == 13.1162
assert weather_state.attributes[ATTR_WEATHER_WIND_BEARING] == 315.14
assert weather_state.attributes[ATTR_WEATHER_WIND_SPEED] == 15.0152
assert weather_state.attributes[ATTR_CLOUD_COVER] == 1
assert weather_state.attributes[ATTR_CLOUD_COVER] == 100
assert weather_state.attributes[ATTR_WIND_GUST] == 20.3421
assert weather_state.attributes[ATTR_PRECIPITATION_TYPE] == "rain"