mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +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."""
|
||||
super().__init__(coordinator)
|
||||
self.device = device
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return information about the device."""
|
||||
return DeviceInfo(
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, self.device.mac)},
|
||||
identifiers={(DOMAIN, (self.device.mac))},
|
||||
self._attr_device_info = DeviceInfo(
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, device.mac)},
|
||||
identifiers={(DOMAIN, device.mac)},
|
||||
manufacturer="TP-Link",
|
||||
model=self.device.model_display_name,
|
||||
name=self.device.name,
|
||||
model=device.model_display_name,
|
||||
name=device.name,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user