From 8e0f88ea1676e6a4c5db4cf783d50686416abb04 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 1 Apr 2023 23:06:37 +0200 Subject: [PATCH] Don't swap the argument of `SensorPlugin.publish_entities` with a list if not required --- platypush/plugins/sensor/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platypush/plugins/sensor/__init__.py b/platypush/plugins/sensor/__init__.py index 3bd38635b7..f50302041e 100644 --- a/platypush/plugins/sensor/__init__.py +++ b/platypush/plugins/sensor/__init__.py @@ -333,8 +333,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC): def publish_entities( self, entities: SensorDataType, *args, **kwargs ) -> Collection[Entity]: - entities_args = [entities] if isinstance(entities, (int, float)) else entities - return super().publish_entities(entities_args, *args, **kwargs) # type: ignore + return super().publish_entities(entities, *args, **kwargs) # type: ignore @abstractmethod @action