mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Fix climacell/tomorrowio config flow test failure (#74660)
This commit is contained in:
parent
3a61a0de2e
commit
a84d92be4d
@ -148,17 +148,16 @@ class BaseClimaCellWeatherEntity(ClimaCellEntity, WeatherEntity):
|
|||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> Mapping[str, Any] | None:
|
def extra_state_attributes(self) -> Mapping[str, Any] | None:
|
||||||
"""Return additional state attributes."""
|
"""Return additional state attributes."""
|
||||||
wind_gust = self.wind_gust
|
|
||||||
wind_gust = round(
|
|
||||||
speed_convert(self.wind_gust, SPEED_MILES_PER_HOUR, self._wind_speed_unit),
|
|
||||||
4,
|
|
||||||
)
|
|
||||||
cloud_cover = self.cloud_cover
|
cloud_cover = self.cloud_cover
|
||||||
return {
|
attrs = {
|
||||||
ATTR_CLOUD_COVER: cloud_cover,
|
ATTR_CLOUD_COVER: cloud_cover,
|
||||||
ATTR_WIND_GUST: wind_gust,
|
|
||||||
ATTR_PRECIPITATION_TYPE: self.precipitation_type,
|
ATTR_PRECIPITATION_TYPE: self.precipitation_type,
|
||||||
}
|
}
|
||||||
|
if (wind_gust := self.wind_gust) is not None:
|
||||||
|
attrs[ATTR_WIND_GUST] = round(
|
||||||
|
speed_convert(wind_gust, SPEED_MILES_PER_HOUR, self._wind_speed_unit), 4
|
||||||
|
)
|
||||||
|
return attrs
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user