Enable new registry rename for Insteon (#17171)
* Enable new registry rename for Insteon * Segment unique_id from name
This commit is contained in:
parent
6e81ae096e
commit
592e1dc96a
1 changed files with 10 additions and 0 deletions
|
@ -465,6 +465,16 @@ class InsteonEntity(Entity):
|
|||
"""Return the INSTEON group that the entity responds to."""
|
||||
return self._insteon_device_state.group
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Return a unique ID."""
|
||||
if self._insteon_device_state.group == 0x01:
|
||||
uid = self._insteon_device.id
|
||||
else:
|
||||
uid = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||
self._insteon_device_state.group)
|
||||
return uid
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the node (used for Entity_ID)."""
|
||||
|
|
Loading…
Add table
Reference in a new issue