Add only unique_id property to yeelightsunflower, not other changes (#36311)
parent
e5d81aeb2a
commit
a333417ddf
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue