From 614525b31525ec8c27f29df3105edaa920f81d94 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: Fri, 29 Oct 2021 14:56:30 +0300 Subject: [PATCH] fix customization i2c --- custom_components/mega/sensor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/mega/sensor.py b/custom_components/mega/sensor.py index b298a0b..dd52844 100644 --- a/custom_components/mega/sensor.py +++ b/custom_components/mega/sensor.py @@ -171,7 +171,12 @@ class MegaI2C(FilterBadValues): @property def customize(self): - return super().customize.get(self.id_suffix, {}) or {} + ret = super().customize + _old = ret.get(self.id_suffix) + if _old is not None: + ret = ret.copy() + ret.update(_old) + return ret @property def extra_state_attributes(self):