mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Round illumination and lux value to one (#19747)
This commit is contained in:
parent
16ab799798
commit
27a9f5a05c
@ -107,5 +107,8 @@ class XiaomiSensor(XiaomiDevice):
|
|||||||
return False
|
return False
|
||||||
if self._data_key == 'pressure' and value == 0:
|
if self._data_key == 'pressure' and value == 0:
|
||||||
return False
|
return False
|
||||||
|
if self._data_key in ['illumination', 'lux']:
|
||||||
|
self._state = round(value)
|
||||||
|
else:
|
||||||
self._state = round(value, 1)
|
self._state = round(value, 1)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user