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:
Dewet Diener 2021-03-23 08:18:48 +00:00 committed by GitHub
parent cd455e296e
commit fb03d79daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -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."""

View File

@ -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": []
}

View File

@ -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