mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Add unique_id for Lightify (#17377)
This commit is contained in:
parent
434d1d7d63
commit
3cf6c76f8b
@ -231,6 +231,11 @@ class OsramLightifyLight(Luminary):
|
|||||||
self._luminary.temp())
|
self._luminary.temp())
|
||||||
self._brightness = int(self._luminary.lum() * 2.55)
|
self._brightness = int(self._luminary.lum() * 2.55)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self):
|
||||||
|
"""Return a unique ID."""
|
||||||
|
return self._light_id
|
||||||
|
|
||||||
|
|
||||||
class OsramLightifyGroup(Luminary):
|
class OsramLightifyGroup(Luminary):
|
||||||
"""Representation of an Osram Lightify Group."""
|
"""Representation of an Osram Lightify Group."""
|
||||||
@ -240,6 +245,7 @@ class OsramLightifyGroup(Luminary):
|
|||||||
self._bridge = bridge
|
self._bridge = bridge
|
||||||
self._light_ids = []
|
self._light_ids = []
|
||||||
super().__init__(group, update_lights)
|
super().__init__(group, update_lights)
|
||||||
|
self._unique_id = '{}'.format(self._light_ids)
|
||||||
|
|
||||||
def _get_state(self):
|
def _get_state(self):
|
||||||
"""Get state of group."""
|
"""Get state of group."""
|
||||||
@ -260,3 +266,8 @@ class OsramLightifyGroup(Luminary):
|
|||||||
else:
|
else:
|
||||||
self._temperature = color_temperature_kelvin_to_mired(o_temp)
|
self._temperature = color_temperature_kelvin_to_mired(o_temp)
|
||||||
self._state = light.on()
|
self._state = light.on()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self):
|
||||||
|
"""Return a unique ID."""
|
||||||
|
return self._unique_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user