Merge branch 'master' into light_scenes
This commit is contained in:
@@ -62,7 +62,7 @@ class LocaltuyaSensor(LocalTuyaEntity):
|
||||
"""Device status was updated."""
|
||||
state = self.dps(self._dp_id)
|
||||
scale_factor = self._config.get(CONF_SCALING)
|
||||
if scale_factor is not None:
|
||||
if scale_factor is not None and isinstance(state, (int, float)):
|
||||
state = round(state * scale_factor, DEFAULT_PRECISION)
|
||||
self._state = state
|
||||
|
||||
|
Reference in New Issue
Block a user