mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Migrate SMHI to new entity naming style (#75213)
This commit is contained in:
parent
630c28d253
commit
06c8eb0304
@ -126,6 +126,8 @@ class SmhiWeather(WeatherEntity):
|
|||||||
_attr_native_wind_speed_unit = SPEED_METERS_PER_SECOND
|
_attr_native_wind_speed_unit = SPEED_METERS_PER_SECOND
|
||||||
_attr_native_pressure_unit = PRESSURE_HPA
|
_attr_native_pressure_unit = PRESSURE_HPA
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
@ -134,8 +136,6 @@ class SmhiWeather(WeatherEntity):
|
|||||||
session: aiohttp.ClientSession,
|
session: aiohttp.ClientSession,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the SMHI weather entity."""
|
"""Initialize the SMHI weather entity."""
|
||||||
|
|
||||||
self._attr_name = name
|
|
||||||
self._attr_unique_id = f"{latitude}, {longitude}"
|
self._attr_unique_id = f"{latitude}, {longitude}"
|
||||||
self._forecasts: list[SmhiForecast] | None = None
|
self._forecasts: list[SmhiForecast] | None = None
|
||||||
self._fail_count = 0
|
self._fail_count = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user