Hue: unique ID for groups + remote events (#50748)

This commit is contained in:
Paulus Schoutsen 2021-05-17 08:07:25 -07:00 committed by GitHub
parent c8486879ae
commit 56774a9f63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 76 additions and 39 deletions

View file

@ -306,7 +306,11 @@ class HueLight(CoordinatorEntity, LightEntity):
@property
def unique_id(self):
"""Return the unique ID of this Hue light."""
return self.light.uniqueid
unique_id = self.light.uniqueid
if not unique_id and self.is_group and self.light.room:
unique_id = self.light.room["id"]
return unique_id
@property
def device_id(self):