Use DeviceInfo in tplink (#58606)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/58628/head
epenet 2021-10-28 18:23:16 +02:00 committed by GitHub
parent a0b3a58d1c
commit 2dcb429c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -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: