From 8146148d0c60f9c8b5f27334e30d64d3fb3d441d Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 18 Feb 2021 10:46:17 +0300 Subject: [PATCH] fix bugs --- custom_components/mega/entities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mega/entities.py b/custom_components/mega/entities.py index 57fc307..a0603e8 100644 --- a/custom_components/mega/entities.py +++ b/custom_components/mega/entities.py @@ -257,9 +257,9 @@ class MegaOutPort(MegaPushEntity): if not isinstance(val, dict): self.mega.lg.warning(f'{self.entity_id}: {val} is not a dict') return - _val = val.get(self.addr) + _val = val.get(self.addr, val.get(self.addr.lower(), val.get(self.addr.upper()))) if not isinstance(val, str): - self.mega.lg.warning(f'{self.entity_id}: can not get {self.addr} from {val}') + self.mega.lg.warning(f'{self.entity_id}: can not get {self.addr} from {val}, recieved {_val}') return _val = _val.split('/') if len(_val) >= 2: