Migrate Trafikverket Weatherstation to new entity naming style (#75211)

pull/71878/head
G Johansson 2022-07-16 17:07:16 +02:00 committed by GitHub
parent 686449cef6
commit 20d70337d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -165,6 +165,7 @@ class TrafikverketWeatherStation(
entity_description: TrafikverketSensorEntityDescription
_attr_attribution = ATTRIBUTION
_attr_has_entity_name = True
def __init__(
self,
@ -176,7 +177,6 @@ class TrafikverketWeatherStation(
"""Initialize the sensor."""
super().__init__(coordinator)
self.entity_description = description
self._attr_name = f"{sensor_station} {description.name}"
self._attr_unique_id = f"{entry_id}_{description.key}"
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,