Entity registry (#11979)
* Entity#unique_id defaults to None * Initial commit entity registry * Clean up unique_id property * Lint * Add tests to entity component * Lint * Restore some unique ids * Spelling * Remove use of IP address for unique ID * Add tests * Add tests * Fix tests * Add some docs * Add one more test * Fix new test…
This commit is contained in:
parent
8e441ba03b
commit
e51427b284
47 changed files with 471 additions and 230 deletions
|
@ -76,8 +76,7 @@ class WemoLight(Light):
|
|||
@property
|
||||
def unique_id(self):
|
||||
"""Return the ID of this light."""
|
||||
deviceid = self.device.uniqueID
|
||||
return '{}.{}'.format(self.__class__, deviceid)
|
||||
return self.device.uniqueID
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
@ -176,7 +175,7 @@ class WemoDimmer(Light):
|
|||
@property
|
||||
def unique_id(self):
|
||||
"""Return the ID of this WeMo dimmer."""
|
||||
return "{}.{}".format(self.__class__, self.wemo.serialnumber)
|
||||
return self.wemo.serialnumber
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue