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
3 changed files with 8 additions and 2 deletions
|
@ -108,6 +108,7 @@ class NanoleafLight(LightEntity):
|
||||||
|
|
||||||
def __init__(self, light, name):
|
def __init__(self, light, name):
|
||||||
"""Initialize an Nanoleaf light."""
|
"""Initialize an Nanoleaf light."""
|
||||||
|
self._unique_id = light.serialNo
|
||||||
self._available = True
|
self._available = True
|
||||||
self._brightness = None
|
self._brightness = None
|
||||||
self._color_temp = None
|
self._color_temp = None
|
||||||
|
@ -157,6 +158,11 @@ class NanoleafLight(LightEntity):
|
||||||
"""Return the warmest color_temp that this light supports."""
|
"""Return the warmest color_temp that this light supports."""
|
||||||
return 833
|
return 833
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self):
|
||||||
|
"""Return a unique ID."""
|
||||||
|
return self._unique_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the display name of this light."""
|
"""Return the display name of this light."""
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
"domain": "nanoleaf",
|
"domain": "nanoleaf",
|
||||||
"name": "Nanoleaf",
|
"name": "Nanoleaf",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/nanoleaf",
|
"documentation": "https://www.home-assistant.io/integrations/nanoleaf",
|
||||||
"requirements": ["pynanoleaf==0.0.5"],
|
"requirements": ["pynanoleaf==0.1.0"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
|
|
@ -1551,7 +1551,7 @@ pymyq==3.0.4
|
||||||
pymysensors==0.21.0
|
pymysensors==0.21.0
|
||||||
|
|
||||||
# homeassistant.components.nanoleaf
|
# homeassistant.components.nanoleaf
|
||||||
pynanoleaf==0.0.5
|
pynanoleaf==0.1.0
|
||||||
|
|
||||||
# homeassistant.components.nello
|
# homeassistant.components.nello
|
||||||
pynello==2.0.3
|
pynello==2.0.3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue