Update xiaomi_aqara.py (#11969)

Sensor can measure temperature below -20, but maybe not so accurate, but no need to discard measurements.
This commit is contained in:
MGWGIT 2018-01-28 00:01:48 +03:00 committed by Fabian Affolter
parent f43234b533
commit 1419005082

View File

@ -71,7 +71,7 @@ class XiaomiSensor(XiaomiDevice):
value /= 100 value /= 100
elif self._data_key in ['illumination']: elif self._data_key in ['illumination']:
value = max(value - 300, 0) value = max(value - 300, 0)
if self._data_key == 'temperature' and (value < -20 or value > 60): if self._data_key == 'temperature' and (value < -50 or value > 60):
return False return False
elif self._data_key == 'humidity' and (value <= 0 or value > 100): elif self._data_key == 'humidity' and (value <= 0 or value > 100):
return False return False