mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Migrate Speedtest.net to new entity naming style (#75004)
This commit is contained in:
parent
964bb63da6
commit
a30d7e5104
@ -49,6 +49,7 @@ class SpeedtestSensor(
|
|||||||
"""Implementation of a speedtest.net sensor."""
|
"""Implementation of a speedtest.net sensor."""
|
||||||
|
|
||||||
entity_description: SpeedtestSensorEntityDescription
|
entity_description: SpeedtestSensorEntityDescription
|
||||||
|
_attr_has_entity_name = True
|
||||||
_attr_icon = ICON
|
_attr_icon = ICON
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -59,7 +60,6 @@ class SpeedtestSensor(
|
|||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
self._attr_name = f"{DEFAULT_NAME} {description.name}"
|
|
||||||
self._attr_unique_id = description.key
|
self._attr_unique_id = description.key
|
||||||
self._state: StateType = None
|
self._state: StateType = None
|
||||||
self._attrs = {ATTR_ATTRIBUTION: ATTRIBUTION}
|
self._attrs = {ATTR_ATTRIBUTION: ATTRIBUTION}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user