Migrate Plum Lightpad to has entity name (#96744)
parent
b0dd05a411
commit
e76254a50f
|
@ -66,6 +66,8 @@ class PlumLight(LightEntity):
|
|||
"""Representation of a Plum Lightpad dimmer."""
|
||||
|
||||
_attr_should_poll = False
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, load):
|
||||
"""Initialize the light."""
|
||||
|
@ -86,11 +88,6 @@ class PlumLight(LightEntity):
|
|||
"""Combine logical load ID with .light to guarantee it is unique."""
|
||||
return f"{self._load.llid}.light"
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the switch if any."""
|
||||
return self._load.name
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device info."""
|
||||
|
@ -98,7 +95,7 @@ class PlumLight(LightEntity):
|
|||
identifiers={(DOMAIN, self.unique_id)},
|
||||
manufacturer="Plum",
|
||||
model="Dimmer",
|
||||
name=self.name,
|
||||
name=self._load.name,
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue