pull/6089/merge
Daniel Høyer Iversen 2017-02-19 17:45:57 +01:00 committed by GitHub
parent dee4c85c32
commit 58f813b518
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class BroadlinkData(object):
def _update(self, retry=2):
try:
data = self._device.check_sensors_raw()
if (data.get('humidity', 0) <= 100 and
if (data is not None and data.get('humidity', 0) <= 100 and
data.get('light', 0) in [0, 1, 2, 3] and
data.get('air_quality', 0) in [0, 1, 2, 3] and
data.get('noise', 0) in [0, 1, 2]):