mirror of https://github.com/home-assistant/core
Bump nanoleaf to 0.1.0, add unique IDs (#48135)
* bump pynanoleaf and expose model/serial as unique_id * addressed PR feedback
This commit is contained in:
parent
cd455e296e
commit
fb03d79daf
|
@ -108,6 +108,7 @@ class NanoleafLight(LightEntity):
|
|||
|
||||
def __init__(self, light, name):
|
||||
"""Initialize an Nanoleaf light."""
|
||||
self._unique_id = light.serialNo
|
||||
self._available = True
|
||||
self._brightness = None
|
||||
self._color_temp = None
|
||||
|
@ -157,6 +158,11 @@ class NanoleafLight(LightEntity):
|
|||
"""Return the warmest color_temp that this light supports."""
|
||||
return 833
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique ID."""
|
||||
return self._unique_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the display name of this light."""
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"domain": "nanoleaf",
|
||||
"name": "Nanoleaf",
|
||||
"documentation": "https://www.home-assistant.io/integrations/nanoleaf",
|
||||
"requirements": ["pynanoleaf==0.0.5"],
|
||||
"requirements": ["pynanoleaf==0.1.0"],
|
||||
"codeowners": []
|
||||
}
|
||||
|
|
|
@ -1551,7 +1551,7 @@ pymyq==3.0.4
|
|||
pymysensors==0.21.0
|
||||
|
||||
# homeassistant.components.nanoleaf
|
||||
pynanoleaf==0.0.5
|
||||
pynanoleaf==0.1.0
|
||||
|
||||
# homeassistant.components.nello
|
||||
pynello==2.0.3
|
||||
|
|
Loading…
Reference in New Issue