mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Add friendly name to Fritz profile switches (#53190)
This commit is contained in:
parent
193d1b945b
commit
1746103e0e
@ -557,20 +557,14 @@ class FritzBoxDeflectionSwitch(FritzBoxBaseSwitch, SwitchEntity):
|
||||
class FritzBoxProfileSwitch(FritzDeviceBase, SwitchEntity):
|
||||
"""Defines a FRITZ!Box Tools DeviceProfile switch."""
|
||||
|
||||
_attr_icon = "mdi:router-wireless-settings"
|
||||
|
||||
def __init__(self, fritzbox_tools: FritzBoxTools, device: FritzDevice) -> None:
|
||||
"""Init Fritz profile."""
|
||||
super().__init__(fritzbox_tools, device)
|
||||
self._attr_is_on: bool = False
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Return device unique id."""
|
||||
return f"{self._mac}_switch"
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return device icon."""
|
||||
return "mdi:router-wireless-settings"
|
||||
self._name = f"{device.hostname} Internet Access"
|
||||
self._attr_unique_id = f"{self._mac}_internet_access"
|
||||
|
||||
async def async_process_update(self) -> None:
|
||||
"""Update device."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user