From ecddeb2dd1e4484eaaebc50a1adb0f494ebbd8a3 Mon Sep 17 00:00:00 2001 From: miroslawkrol <53930034+miroslawkrol@users.noreply.github.com> Date: Fri, 9 Aug 2019 17:21:18 +0200 Subject: [PATCH] Fix Broadlink MP1 unavailable error (#25806) --- homeassistant/components/broadlink/switch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/broadlink/switch.py b/homeassistant/components/broadlink/switch.py index 2a7255f5a61..4d3fa644f47 100644 --- a/homeassistant/components/broadlink/switch.py +++ b/homeassistant/components/broadlink/switch.py @@ -337,6 +337,10 @@ class BroadlinkMP1Slot(BroadlinkRMSwitch): """Trigger update for all switches on the parent device.""" self._parent_device.update() 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: