mirror of
https://github.com/home-assistant/core.git
synced 2025-06-09 23:57:08 +00:00
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
@ -465,6 +465,16 @@ class InsteonEntity(Entity):
|
|||||||
"""Return the INSTEON group that the entity responds to."""
|
"""Return the INSTEON group that the entity responds to."""
|
||||||
return self._insteon_device_state.group
|
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
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the name of the node (used for Entity_ID)."""
|
"""Return the name of the node (used for Entity_ID)."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user