Add explicit return none and binary sensor availability to yeelight (#35649)
* Add explicit return none and binary sensor availbility * Fixpull/35667/head
parent
ddb5ed9dc8
commit
92756f9b12
|
@ -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."""
|
||||
|
|
|
@ -917,6 +917,8 @@ class YeelightNightLightMode(YeelightGenericLight):
|
|||
if unique:
|
||||
return unique + "-nightlight"
|
||||
|
||||
return None
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the device if any."""
|
||||
|
|
Loading…
Reference in New Issue