From 3f3726c50ae4502d68cb68d5d8cd4001d7dbf142 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 1 Apr 2023 23:34:22 +0200 Subject: [PATCH] Fixed another occurrence of "Subscripted generics cannot be used" etc. error --- platypush/plugins/sensor/__init__.py | 2 +- platypush/plugins/{gpio => }/sensor/envirophat/__init__.py | 0 platypush/plugins/{gpio => }/sensor/envirophat/manifest.yaml | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename platypush/plugins/{gpio => }/sensor/envirophat/__init__.py (100%) rename platypush/plugins/{gpio => }/sensor/envirophat/manifest.yaml (100%) diff --git a/platypush/plugins/sensor/__init__.py b/platypush/plugins/sensor/__init__.py index f1926d8d3..923c1570a 100644 --- a/platypush/plugins/sensor/__init__.py +++ b/platypush/plugins/sensor/__init__.py @@ -246,7 +246,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC): return events # Scalar case - if isinstance(old_data, (Numeric, NoneType)) and isinstance( + if isinstance(old_data, (int, float, NoneType)) and isinstance( new_data, (int, float) ): return self._process_scalar_threshold_events( diff --git a/platypush/plugins/gpio/sensor/envirophat/__init__.py b/platypush/plugins/sensor/envirophat/__init__.py similarity index 100% rename from platypush/plugins/gpio/sensor/envirophat/__init__.py rename to platypush/plugins/sensor/envirophat/__init__.py diff --git a/platypush/plugins/gpio/sensor/envirophat/manifest.yaml b/platypush/plugins/sensor/envirophat/manifest.yaml similarity index 100% rename from platypush/plugins/gpio/sensor/envirophat/manifest.yaml rename to platypush/plugins/sensor/envirophat/manifest.yaml