Skip to content

Commit

Permalink
Round illumination and lux value to one (#19747)
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu authored and syssi committed Jan 4, 2019
1 parent 16ab799 commit 27a9f5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/sensor/xiaomi_aqara.py
Expand Up @@ -107,5 +107,8 @@ def parse_data(self, data, raw_data):
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

0 comments on commit 27a9f5a

Please sign in to comment.