Fix yeelight binary sensor unique ID (#42562)

This commit is contained in:
Xiaonan Shen 2020-11-09 14:32:21 +07:00 committed by GitHub
parent d9d21ab05e
commit f499187835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -34,6 +34,11 @@ class YeelightNightlightModeSensor(YeelightEntity, BinarySensorEntity):
)
)
@property
def unique_id(self) -> str:
"""Return a unique ID."""
return f"{self._unique_id}-nightlight_sensor"
@property
def name(self):
"""Return the name of the sensor."""