Add explicit return none and binary sensor availability to yeelight (#35649)
* Add explicit return none and binary sensor availbility * Fix
This commit is contained in:
1 parent
ddb5ed9dc8
commit
92756f9b12
2 files changed
+9
No files matched your search
@@ -47,6 +47,13 @@ class YeelightNightlightModeSensor(BinarySensorEntity):
|
||||
if unique:
|
||||
return unique + "-nightlight_sensor"
|
||||
|
||||
return None
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return if bulb is available."""
|
||||
return self._device.available
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
|
||||
Reference in new issue
Block a user