forked from home-assistant/core
Don't return a unique_id if Lutron doesn't have a UUID for the device. (#56113)
This is a workaround for https://github.com/thecynic/pylutron/issues/70 Co-authored-by: cdheiser <cdheiser@users.noreply.github.com>
This commit is contained in:
@@ -131,6 +131,9 @@ class LutronDevice(Entity):
|
|||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return a unique ID."""
|
"""Return a unique ID."""
|
||||||
|
# Temporary fix for https://github.com/thecynic/pylutron/issues/70
|
||||||
|
if self._lutron_device.uuid is None:
|
||||||
|
return None
|
||||||
return f"{self._controller.guid}_{self._lutron_device.uuid}"
|
return f"{self._controller.guid}_{self._lutron_device.uuid}"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user