Remove rounding from The Things Network (#47157)

This commit is contained in:
stephan192 2021-03-02 02:00:42 +01:00 committed by GitHub
parent d02218ff30
commit 7bc2328802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,8 +81,8 @@ class TtnDataSensor(Entity):
"""Return the state of the entity."""
if self._ttn_data_storage.data is not None:
try:
return round(self._state[self._value], 1)
except (KeyError, TypeError):
return self._state[self._value]
except KeyError:
return None
return None