mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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
|
||||
if self._data_key == 'pressure' and value == 0:
|
||||
return False
|
||||
if self._data_key in ['illumination', 'lux']:
|
||||
self._state = round(value)
|
||||
else:
|
||||
self._state = round(value, 1)
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user