Add unique_id to Vera entities (#17450)
I believe this adds registry support. The UI allows me to change the entity ID now. For example, a light bulb called "BasementHallLight" in the Vera has an initial Entity ID like light.basementhalllight_108, where 108 is the unique ID that the Vera assigned the device when I added it to the z-wave network. Now I can use the UI to change the Entity ID to light.basementhalllight and I can still turn it on and off.
This commit is contained in:
parent
6b3e4ca7bd
commit
83db673bd0
1 changed files with 8 additions and 0 deletions
|
@ -195,3 +195,11 @@ class VeraDevice(Entity):
|
||||||
attr['Vera Device Id'] = self.vera_device.vera_device_id
|
attr['Vera Device Id'] = self.vera_device.vera_device_id
|
||||||
|
|
||||||
return attr
|
return attr
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self) -> str:
|
||||||
|
"""Return a unique ID.
|
||||||
|
|
||||||
|
The Vera assigns a unique and immutable ID number to each device.
|
||||||
|
"""
|
||||||
|
return str(self.vera_device.vera_device_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue