From 88784985e1f51553fb3f558068ac3c6e5de1d286 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 2 Apr 2023 12:08:40 +0200 Subject: [PATCH] Should be `abs(old_data - new_data) >= tolerance`. Not `abs(old_data - new_data) > tolerance`. --- platypush/plugins/sensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/sensor/__init__.py b/platypush/plugins/sensor/__init__.py index d6dc8c76fe..d94f9815cb 100644 --- a/platypush/plugins/sensor/__init__.py +++ b/platypush/plugins/sensor/__init__.py @@ -135,7 +135,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC): else: tolerance = 0 - return abs(old_data - new_data) > tolerance + return abs(old_data - new_data) >= tolerance def _has_changes( self,