mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Migrate Kulersky to has entity name (#96702)
This commit is contained in:
parent
088d04fe0f
commit
f0fb09c2be
@ -62,7 +62,10 @@ async def async_setup_entry(
|
|||||||
|
|
||||||
|
|
||||||
class KulerskyLight(LightEntity):
|
class KulerskyLight(LightEntity):
|
||||||
"""Representation of an Kuler Sky Light."""
|
"""Representation of a Kuler Sky Light."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, light: pykulersky.Light) -> None:
|
def __init__(self, light: pykulersky.Light) -> None:
|
||||||
"""Initialize a Kuler Sky light."""
|
"""Initialize a Kuler Sky light."""
|
||||||
@ -88,11 +91,6 @@ class KulerskyLight(LightEntity):
|
|||||||
"Exception disconnected from %s", self._light.address, exc_info=True
|
"Exception disconnected from %s", self._light.address, exc_info=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def name(self):
|
|
||||||
"""Return the display name of this light."""
|
|
||||||
return self._light.name
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return the ID of this light."""
|
"""Return the ID of this light."""
|
||||||
@ -104,7 +102,7 @@ class KulerskyLight(LightEntity):
|
|||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={(DOMAIN, self.unique_id)},
|
identifiers={(DOMAIN, self.unique_id)},
|
||||||
manufacturer="Brightech",
|
manufacturer="Brightech",
|
||||||
name=self.name,
|
name=self._light.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user