mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Fix missing position attribute for MeteoFranceAlertSensor (#39938)
This commit is contained in:
parent
c2a9a39ee0
commit
062ac5f27d
@ -79,6 +79,7 @@ class MeteoFranceSensor(CoordinatorEntity):
|
||||
"""Initialize the Meteo-France sensor."""
|
||||
super().__init__(coordinator)
|
||||
self._type = sensor_type
|
||||
if hasattr(self.coordinator.data, "position"):
|
||||
city_name = self.coordinator.data.position["name"]
|
||||
self._name = f"{city_name} {SENSOR_TYPES[self._type][ENTITY_NAME]}"
|
||||
self._unique_id = f"{self.coordinator.data.position['lat']},{self.coordinator.data.position['lon']}_{self._type}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user