From c2b119bfaf255a042770bd3d85f66e50145b845c Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 8 Sep 2023 01:07:15 +0200 Subject: [PATCH] Use shorthand attributes in Tp-link Omada (#99889) --- homeassistant/components/tplink_omada/entity.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/tplink_omada/entity.py b/homeassistant/components/tplink_omada/entity.py index bb330ef417a..5008b7e4b18 100644 --- a/homeassistant/components/tplink_omada/entity.py +++ b/homeassistant/components/tplink_omada/entity.py @@ -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, )