From 58d243dcc3e63cf6e894fdc2c025df8f7a04b476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20=D0=90?= =?UTF-8?q?=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=93=D0=B5=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 28 Oct 2021 16:41:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D1=8B=20=D1=81=D0=BF=D0=BE?= =?UTF-8?q?=D1=81=D0=BE=D0=B1=20=D0=B0=D0=B4=D1=80=D0=B5=D1=81=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=BA=D0=B0=D1=81=D1=82=D0=BE=D0=BC=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/mega/entities.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/mega/entities.py b/custom_components/mega/entities.py index b8bc7c7..2fae4c8 100644 --- a/custom_components/mega/entities.py +++ b/custom_components/mega/entities.py @@ -129,12 +129,14 @@ class BaseMegaEntity(CoordinatorEntity, RestoreEntity): if self.hass is None: return {} if self._customize is None: + c_entity_id = self.hass.data.get(DOMAIN, {}).get(self.entity_id, {}) c = self.hass.data.get(DOMAIN, {}).get(CONF_CUSTOM) or {} c = c.get(self._mega_id) or {} c = c.get(self.port) or {} if self.addr is not None and self.index is not None and isinstance(c, dict): idx = self.addr.lower() + f'_a' if self.index == 0 else '_b' c = c.get(idx, {}) + c.update(c_entity_id) self._customize = c return self._customize