mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Set _attr_condition in WeatherEntity (#98459)
This commit is contained in:
parent
92cf6ed2a0
commit
496a975c58
@ -136,7 +136,6 @@ class BrWeather(WeatherEntity):
|
||||
self._stationname = config.get(CONF_NAME, "Buienradar")
|
||||
self._attr_name = self._stationname or f"BR {'(unknown station)'}"
|
||||
|
||||
self._attr_condition = None
|
||||
self._attr_unique_id = "{:2.6f}{:2.6f}".format(
|
||||
coordinates[CONF_LATITUDE], coordinates[CONF_LONGITUDE]
|
||||
)
|
||||
|
@ -149,7 +149,6 @@ class SmhiWeather(WeatherEntity):
|
||||
name=name,
|
||||
configuration_url="http://opendata.smhi.se/apidocs/metfcst/parameters.html",
|
||||
)
|
||||
self._attr_condition = None
|
||||
self._attr_native_temperature = None
|
||||
|
||||
@property
|
||||
|
@ -227,7 +227,7 @@ class WeatherEntity(Entity, PostInit):
|
||||
"""ABC for weather data."""
|
||||
|
||||
entity_description: WeatherEntityDescription
|
||||
_attr_condition: str | None
|
||||
_attr_condition: str | None = None
|
||||
# _attr_forecast is deprecated, implement async_forecast_daily,
|
||||
# async_forecast_hourly or async_forecast_twice daily instead
|
||||
_attr_forecast: list[Forecast] | None = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user