mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Use icon translations in devolo Home Network device tracker (#143089)
This commit is contained in:
parent
950c332e36
commit
42277955fa
@ -88,6 +88,8 @@ class DevoloScannerEntity( # pylint: disable=hass-enforce-class-module
|
||||
):
|
||||
"""Representation of a devolo device tracker."""
|
||||
|
||||
_attr_translation_key = "device_tracker"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
coordinator: DevoloDataUpdateCoordinator[list[ConnectedStationInfo]],
|
||||
@ -123,13 +125,6 @@ class DevoloScannerEntity( # pylint: disable=hass-enforce-class-module
|
||||
)
|
||||
return attrs
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return device icon."""
|
||||
if self.is_connected:
|
||||
return "mdi:lan-connect"
|
||||
return "mdi:lan-disconnect"
|
||||
|
||||
@property
|
||||
def is_connected(self) -> bool:
|
||||
"""Return true if the device is connected to the network."""
|
||||
|
@ -13,6 +13,14 @@
|
||||
"default": "mdi:wifi-plus"
|
||||
}
|
||||
},
|
||||
"device_tracker": {
|
||||
"device_tracker": {
|
||||
"default": "mdi:lan-disconnect",
|
||||
"state": {
|
||||
"home": "mdi:lan-connect"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"connected_plc_devices": {
|
||||
"default": "mdi:lan"
|
||||
|
@ -3,7 +3,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'band': '5 GHz',
|
||||
'icon': 'mdi:lan-connect',
|
||||
'mac': 'AA:BB:CC:DD:EE:FF',
|
||||
'source_type': <SourceType.ROUTER: 'router'>,
|
||||
'wifi': 'Main',
|
||||
|
Loading…
x
Reference in New Issue
Block a user