Fix Broadlink MP1 unavailable error (#25806)
This commit is contained in:
parent
e47ed0e182
commit
ecddeb2dd1
1 changed files with 4 additions and 0 deletions
|
@ -337,6 +337,10 @@ class BroadlinkMP1Slot(BroadlinkRMSwitch):
|
||||||
"""Trigger update for all switches on the parent device."""
|
"""Trigger update for all switches on the parent device."""
|
||||||
self._parent_device.update()
|
self._parent_device.update()
|
||||||
self._state = self._parent_device.get_outlet_status(self._slot)
|
self._state = self._parent_device.get_outlet_status(self._slot)
|
||||||
|
if self._state is None:
|
||||||
|
self._is_available = False
|
||||||
|
else:
|
||||||
|
self._is_available = True
|
||||||
|
|
||||||
|
|
||||||
class BroadlinkMP1Switch:
|
class BroadlinkMP1Switch:
|
||||||
|
|
Loading…
Add table
Reference in a new issue