mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
check for None state in broadlink (#24589)
This commit is contained in:
parent
08e2959742
commit
9413b5a415
@ -322,6 +322,8 @@ class BroadlinkMP1Switch:
|
|||||||
|
|
||||||
def get_outlet_status(self, slot):
|
def get_outlet_status(self, slot):
|
||||||
"""Get status of outlet from cached status list."""
|
"""Get status of outlet from cached status list."""
|
||||||
|
if self._states is None:
|
||||||
|
return None
|
||||||
return self._states['s{}'.format(slot)]
|
return self._states['s{}'.format(slot)]
|
||||||
|
|
||||||
@Throttle(TIME_BETWEEN_UPDATES)
|
@Throttle(TIME_BETWEEN_UPDATES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user