Fixes/zha ieee tail (#28160)
* Fix ZHA entity_id assignment. * Update tests.
This commit is contained in:
parent
3b934166a5
commit
059d2572a2
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class ZhaEntity(RestoreEntity, LogMixin, entity.Entity):
|
|||
self._unique_id = unique_id
|
||||
if not skip_entity_id:
|
||||
ieee = zha_device.ieee
|
||||
ieeetail = "".join(["%02x" % (o,) for o in ieee[-4:]])
|
||||
ieeetail = "".join([f"{o:02x}" for o in ieee[:4]])
|
||||
self.entity_id = "{}.{}_{}_{}_{}{}".format(
|
||||
self._domain,
|
||||
slugify(zha_device.manufacturer),
|
||||
|
|
|
@ -168,7 +168,7 @@ def make_entity_id(domain, device, cluster, use_suffix=True):
|
|||
machine so that we can test state changes.
|
||||
"""
|
||||
ieee = device.ieee
|
||||
ieeetail = "".join(["%02x" % (o,) for o in ieee[-4:]])
|
||||
ieeetail = "".join([f"{o:02x}" for o in ieee[:4]])
|
||||
entity_id = "{}.{}_{}_{}_{}{}".format(
|
||||
domain,
|
||||
slugify(device.manufacturer),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue