Use DeviceInfo in twinkly (#58609)

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

View File

@ -108,12 +108,12 @@ class TwinklyLight(LightEntity):
def device_info(self) -> DeviceInfo | None:
"""Get device specific attributes."""
return (
{
"identifiers": {(DOMAIN, self._id)},
"name": self.name,
"manufacturer": "LEDWORKS",
"model": self.model,
}
DeviceInfo(
identifiers={(DOMAIN, self._id)},
manufacturer="LEDWORKS",
model=self.model,
name=self.name,
)
if self._id
else None # device_info is available only for entities configured from the UI
)