From 7e9a67194a2fed7d1e651fc48ada10998d64b0cb Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 28 Oct 2021 18:24:20 +0200 Subject: [PATCH] Use DeviceInfo in twinkly (#58609) Co-authored-by: epenet --- homeassistant/components/twinkly/light.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/twinkly/light.py b/homeassistant/components/twinkly/light.py index b0f94a1c52f..2c742ba93f5 100644 --- a/homeassistant/components/twinkly/light.py +++ b/homeassistant/components/twinkly/light.py @@ -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 )