From a333417ddf15f60a9f1c28e61e67e3af30d659cc Mon Sep 17 00:00:00 2001 From: Lindsay Ward Date: Tue, 2 Jun 2020 02:36:43 +1000 Subject: [PATCH] Add only unique_id property to yeelightsunflower, not other changes (#36311) --- homeassistant/components/yeelightsunflower/light.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/yeelightsunflower/light.py b/homeassistant/components/yeelightsunflower/light.py index 2e17b92c90a..abe3d5a404b 100644 --- a/homeassistant/components/yeelightsunflower/light.py +++ b/homeassistant/components/yeelightsunflower/light.py @@ -25,7 +25,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string}) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Yeelight Sunflower Light platform.""" - host = config.get(CONF_HOST) hub = yeelightsunflower.Hub(host) @@ -46,12 +45,18 @@ class SunflowerBulb(LightEntity): self._brightness = light.brightness self._is_on = light.is_on self._hs_color = light.rgb_color + self._unique_id = light.zid @property def name(self): """Return the display name of this light.""" return f"sunflower_{self._light.zid}" + @property + def unique_id(self): + """Return the unique ID of this light.""" + return self._unique_id + @property def available(self): """Return True if entity is available."""