From de7bbd3e24bee53b98a5481ac6fecf9505ca0565 Mon Sep 17 00:00:00 2001 From: Eugene Prystupa Date: Mon, 8 Jun 2020 00:52:03 -0400 Subject: [PATCH] Add plum_lightpad unique ids (#36549) --- homeassistant/components/plum_lightpad/light.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/plum_lightpad/light.py b/homeassistant/components/plum_lightpad/light.py index 737c6f2bfad..2fea14474bb 100644 --- a/homeassistant/components/plum_lightpad/light.py +++ b/homeassistant/components/plum_lightpad/light.py @@ -54,6 +54,11 @@ class PlumLight(LightEntity): """No polling needed.""" return False + @property + def unique_id(self): + """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.""" @@ -130,6 +135,11 @@ class GlowRing(LightEntity): """No polling needed.""" return False + @property + def unique_id(self): + """Combine LightPad ID with .glow to guarantee it is unique.""" + return f"{self._lightpad.lpid}.glow" + @property def name(self): """Return the name of the switch if any."""