Migrate Speedtest.net to new entity naming style (#75004)

pull/75029/head
Franck Nijhof 2022-07-11 18:13:09 +02:00 committed by GitHub
parent 964bb63da6
commit a30d7e5104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,6 +49,7 @@ class SpeedtestSensor(
"""Implementation of a speedtest.net sensor."""
entity_description: SpeedtestSensorEntityDescription
_attr_has_entity_name = True
_attr_icon = ICON
def __init__(
@ -59,7 +60,6 @@ class SpeedtestSensor(
"""Initialize the sensor."""
super().__init__(coordinator)
self.entity_description = description
self._attr_name = f"{DEFAULT_NAME} {description.name}"
self._attr_unique_id = description.key
self._state: StateType = None
self._attrs = {ATTR_ATTRIBUTION: ATTRIBUTION}