Round illumination and lux value to one (#19747)
This commit is contained in:
1 parent
16ab799798
commit
27a9f5a05c
1 file changed
+4
-1
@@ -107,5 +107,8 @@ class XiaomiSensor(XiaomiDevice):
|
||||
return False
|
||||
if self._data_key == 'pressure' and value == 0:
|
||||
return False
|
||||
self._state = round(value, 1)
|
||||
if self._data_key in ['illumination', 'lux']:
|
||||
self._state = round(value)
|
||||
else:
|
||||
self._state = round(value, 1)
|
||||
return True
|
||||
Reference in new issue
Block a user