mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Use shorthand attributes in Tp-link Omada (#99889)
This commit is contained in:
parent
5a66aac330
commit
c2b119bfaf
@ -20,14 +20,10 @@ class OmadaDeviceEntity(CoordinatorEntity[OmadaCoordinator[T]], Generic[T]):
|
|||||||
"""Initialize the device."""
|
"""Initialize the device."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
self.device = device
|
self.device = device
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
@property
|
connections={(dr.CONNECTION_NETWORK_MAC, device.mac)},
|
||||||
def device_info(self) -> DeviceInfo:
|
identifiers={(DOMAIN, device.mac)},
|
||||||
"""Return information about the device."""
|
|
||||||
return DeviceInfo(
|
|
||||||
connections={(dr.CONNECTION_NETWORK_MAC, self.device.mac)},
|
|
||||||
identifiers={(DOMAIN, (self.device.mac))},
|
|
||||||
manufacturer="TP-Link",
|
manufacturer="TP-Link",
|
||||||
model=self.device.model_display_name,
|
model=device.model_display_name,
|
||||||
name=self.device.name,
|
name=device.name,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user