mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove scale calculation for climacell cloud cover (#52752)
This commit is contained in:
parent
eb735b6162
commit
49181d6ba8
@ -214,7 +214,6 @@ CC_SENSOR_TYPES = [
|
|||||||
ATTR_FIELD: CC_ATTR_CLOUD_COVER,
|
ATTR_FIELD: CC_ATTR_CLOUD_COVER,
|
||||||
ATTR_NAME: "Cloud Cover",
|
ATTR_NAME: "Cloud Cover",
|
||||||
CONF_UNIT_OF_MEASUREMENT: PERCENTAGE,
|
CONF_UNIT_OF_MEASUREMENT: PERCENTAGE,
|
||||||
ATTR_SCALE: 1 / 100,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ATTR_FIELD: CC_ATTR_WIND_GUST,
|
ATTR_FIELD: CC_ATTR_WIND_GUST,
|
||||||
|
@ -207,8 +207,6 @@ class BaseClimaCellWeatherEntity(ClimaCellEntity, WeatherEntity):
|
|||||||
distance_convert(self.wind_gust, LENGTH_MILES, LENGTH_KILOMETERS), 4
|
distance_convert(self.wind_gust, LENGTH_MILES, LENGTH_KILOMETERS), 4
|
||||||
)
|
)
|
||||||
cloud_cover = self.cloud_cover
|
cloud_cover = self.cloud_cover
|
||||||
if cloud_cover is not None:
|
|
||||||
cloud_cover /= 100
|
|
||||||
return {
|
return {
|
||||||
ATTR_CLOUD_COVER: cloud_cover,
|
ATTR_CLOUD_COVER: cloud_cover,
|
||||||
ATTR_WIND_GUST: wind_gust,
|
ATTR_WIND_GUST: wind_gust,
|
||||||
|
@ -182,7 +182,7 @@ async def test_v4_sensor(
|
|||||||
check_sensor_state(hass, PRESSURE_SURFACE_LEVEL, "997.9688")
|
check_sensor_state(hass, PRESSURE_SURFACE_LEVEL, "997.9688")
|
||||||
check_sensor_state(hass, GHI, "0.0")
|
check_sensor_state(hass, GHI, "0.0")
|
||||||
check_sensor_state(hass, CLOUD_BASE, "1.1909")
|
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, CLOUD_CEILING, "1.1909")
|
||||||
check_sensor_state(hass, WIND_GUST, "5.6506")
|
check_sensor_state(hass, WIND_GUST, "5.6506")
|
||||||
check_sensor_state(hass, PRECIPITATION_TYPE, "rain")
|
check_sensor_state(hass, PRECIPITATION_TYPE, "rain")
|
||||||
|
@ -228,7 +228,7 @@ async def test_v3_weather(
|
|||||||
assert weather_state.attributes[ATTR_WEATHER_VISIBILITY] == 9.9940
|
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_BEARING] == 320.31
|
||||||
assert weather_state.attributes[ATTR_WEATHER_WIND_SPEED] == 14.6289
|
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_WIND_GUST] == 24.0758
|
||||||
assert weather_state.attributes[ATTR_PRECIPITATION_TYPE] == "rain"
|
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_VISIBILITY] == 13.1162
|
||||||
assert weather_state.attributes[ATTR_WEATHER_WIND_BEARING] == 315.14
|
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_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_WIND_GUST] == 20.3421
|
||||||
assert weather_state.attributes[ATTR_PRECIPITATION_TYPE] == "rain"
|
assert weather_state.attributes[ATTR_PRECIPITATION_TYPE] == "rain"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user