Limit to 3 decimals (fixes #14773)

This commit is contained in:
Fabian Affolter committed 2018-06-05 19:44:41 +02:00
1 parent e35d4beb95
commit f1aba5511f
2 files changed
+17 -23

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ class SimulatedSensor(Entity):
else:
periodic = amp * (math.sin((2*math.pi*time_delta/period) + phase))
noise = self._random.gauss(mu=0, sigma=fwhm)
return mean + periodic + noise
return round(mean + periodic + noise, 3)
async def async_update(self):
"""Update the sensor."""