Add unique_id for decora_wifi lights (#66142)

I have some decora_wifi switches that I want to be able to move around
to different rooms within Home Assistant, and for that to be practical,
they need unique IDs, so here we are.

Signed-off-by: Jarod Wilson <jarodwilson@gmail.com>
This commit is contained in:
Jarod Wilson 2022-02-10 11:10:58 -05:00 committed by GitHub
parent dd48f1e6fc
commit deb8185911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,7 @@ class DecoraWifiLight(LightEntity):
def __init__(self, switch):
"""Initialize the switch."""
self._switch = switch
self._attr_unique_id = switch.serial
@property
def supported_features(self):