From 1573f47b6827250c7ec2b357ace8ef8cb7abfc4b Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Wed, 23 Oct 2019 20:53:16 -0400 Subject: [PATCH] Fix ZHA entity_id assignment. --- homeassistant/components/zha/entity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zha/entity.py b/homeassistant/components/zha/entity.py index 00c3942358e1fe..c11cd405a99402 100644 --- a/homeassistant/components/zha/entity.py +++ b/homeassistant/components/zha/entity.py @@ -40,7 +40,7 @@ def __init__(self, unique_id, zha_device, channels, skip_entity_id=False, **kwar 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),