Use DeviceInfo in tplink (#58606)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/58628/head
parent
a0b3a58d1c
commit
2dcb429c95
|
@ -48,14 +48,14 @@ class CoordinatedTPLinkEntity(CoordinatorEntity):
|
|||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return information about the device."""
|
||||
return {
|
||||
"name": self.device.alias,
|
||||
"model": self.device.model,
|
||||
"manufacturer": "TP-Link",
|
||||
"identifiers": {(DOMAIN, str(self.device.device_id))},
|
||||
"connections": {(dr.CONNECTION_NETWORK_MAC, self.device.mac)},
|
||||
"sw_version": self.device.hw_info["sw_ver"],
|
||||
}
|
||||
return DeviceInfo(
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, self.device.mac)},
|
||||
identifiers={(DOMAIN, str(self.device.device_id))},
|
||||
manufacturer="TP-Link",
|
||||
model=self.device.model,
|
||||
name=self.device.alias,
|
||||
sw_version=self.device.hw_info["sw_ver"],
|
||||
)
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
|
Loading…
Reference in New Issue