check for None state in broadlink (#24589)
This commit is contained in:
parent
08e2959742
commit
9413b5a415
1 changed files with 2 additions and 0 deletions
|
@ -322,6 +322,8 @@ class BroadlinkMP1Switch:
|
|||
|
||||
def get_outlet_status(self, slot):
|
||||
"""Get status of outlet from cached status list."""
|
||||
if self._states is None:
|
||||
return None
|
||||
return self._states['s{}'.format(slot)]
|
||||
|
||||
@Throttle(TIME_BETWEEN_UPDATES)
|
||||
|
|
Loading…
Add table
Reference in a new issue