Migrate Zerproc to has entity naming (#96837)
parent
5c54fa1ce1
commit
d46a72e5ab
|
@ -82,6 +82,8 @@ class ZerprocLight(LightEntity):
|
|||
_attr_color_mode = ColorMode.HS
|
||||
_attr_icon = "mdi:string-lights"
|
||||
_attr_supported_color_modes = {ColorMode.HS}
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, light) -> None:
|
||||
"""Initialize a Zerproc light."""
|
||||
|
@ -106,11 +108,6 @@ class ZerprocLight(LightEntity):
|
|||
"Exception disconnecting from %s", self._light.address, exc_info=True
|
||||
)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the display name of this light."""
|
||||
return self._light.name
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return the ID of this light."""
|
||||
|
@ -122,7 +119,7 @@ class ZerprocLight(LightEntity):
|
|||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self.unique_id)},
|
||||
manufacturer="Zerproc",
|
||||
name=self.name,
|
||||
name=self._light.name,
|
||||
)
|
||||
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
|
|
Loading…
Reference in New Issue