diff options
-rw-r--r-- | broadlink/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 7a385fc1556e..4f1cc823e668 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -357,6 +357,8 @@ class mp1(device): def check_power(self): """Returns the power state of the smart power strip.""" state = self.check_power_raw() + if state is None: + return {'s1': None, 's2': None, 's3': None, 's4': None} data = {} data['s1'] = bool(state & 0x01) data['s2'] = bool(state & 0x02) |