Set _attr_condition in WeatherEntity (#98459)

This commit is contained in:
Erik Montnemery 2023-08-15 17:17:35 +02:00 committed by GitHub
parent 92cf6ed2a0
commit 496a975c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 3 deletions

View File

@ -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]
)

View File

@ -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

View File

@ -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