fix scanning

This commit is contained in:
Andrey
2021-01-25 15:52:24 +03:00
parent 5eadd295f1
commit 5da2973351
2 changed files with 5 additions and 3 deletions

View File

@@ -154,5 +154,7 @@ class Mega1WSensor(MegaPushEntity):
@property
def name(self):
n = super().name
c = self.customize.get(CONF_NAME, {}).get(self.key)
c = self.customize.get(CONF_NAME, {})
if isinstance(c, dict):
c = c.get(self.key)
return c or n