diff --git a/homeassistant/components/yeelight/binary_sensor.py b/homeassistant/components/yeelight/binary_sensor.py index cc2145d93b..1696ca9bcb 100644 --- a/homeassistant/components/yeelight/binary_sensor.py +++ b/homeassistant/components/yeelight/binary_sensor.py @@ -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.""" diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index e0ece2afdb..244ccd5745 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -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."""