Update xiaomi_aqara.py (#9920)

pull/9927/head
Daniel Høyer Iversen 2017-10-17 18:04:19 +02:00 committed by Pascal Vizeli
parent 778c3bb83d
commit 382f9a8f49
1 changed files with 2 additions and 2 deletions

View File

@ -67,9 +67,9 @@ class XiaomiSensor(XiaomiDevice):
if value is None:
return False
value = float(value)
if self._data_key == 'temperature' and value == 10000:
if self._data_key == 'temperature' and (value < -20 or value > 60):
return False
elif self._data_key == 'humidity' and value == 0:
elif self._data_key == 'humidity' and (value <= 0 or value > 100):
return False
elif self._data_key == 'illumination' and value == 0:
return False