broadlink (#6101)
This commit is contained in:
1 parent
dee4c85c32
commit
58f813b518
1 file changed
+1
-1
@@ -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]):
|
||||
|
||||
Reference in new issue
Block a user