From e76254a50fe0d546300ce34e5ae45df3e4cfea1f Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 17 Jul 2023 14:42:58 +0200 Subject: [PATCH] Migrate Plum Lightpad to has entity name (#96744) --- homeassistant/components/plum_lightpad/light.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/plum_lightpad/light.py b/homeassistant/components/plum_lightpad/light.py index 9f26200e9ae..ac0dd0c919c 100644 --- a/homeassistant/components/plum_lightpad/light.py +++ b/homeassistant/components/plum_lightpad/light.py @@ -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