mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
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:
parent
dd48f1e6fc
commit
deb8185911
@ -96,6 +96,7 @@ class DecoraWifiLight(LightEntity):
|
|||||||
def __init__(self, switch):
|
def __init__(self, switch):
|
||||||
"""Initialize the switch."""
|
"""Initialize the switch."""
|
||||||
self._switch = switch
|
self._switch = switch
|
||||||
|
self._attr_unique_id = switch.serial
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user