From f24d0773d1a58b54c5d545b0472f19618006a3a9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 1 Apr 2023 23:54:43 +0200 Subject: [PATCH] No need for `sensor.vl53l1x.transform_entities` to call the parent. --- .../sensor/distance/vl53l1x/__init__.py | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/platypush/plugins/sensor/distance/vl53l1x/__init__.py b/platypush/plugins/sensor/distance/vl53l1x/__init__.py index 3c0f1bc21..1060a2a88 100644 --- a/platypush/plugins/sensor/distance/vl53l1x/__init__.py +++ b/platypush/plugins/sensor/distance/vl53l1x/__init__.py @@ -111,23 +111,21 @@ class SensorDistanceVl53l1xPlugin(SensorPlugin): @override def transform_entities(self, entities: Mapping[str, int]) -> List[Device]: - return super().transform_entities( # type: ignore - [ - Device( - id='vl53l1x', - name='VL53L1X Distance Sensor', - children=[ - DistanceSensor( - id=f'vl53l1x:{key}', - name=f'{key} distance', - value=value, - unit='mm', - ) - for key, value in entities.items() - ], - ) - ] - ) + return [ + Device( + id='vl53l1x', + name='VL53L1X Distance Sensor', + children=[ + DistanceSensor( + id=f'vl53l1x:{key}', + name=f'{key} distance', + value=value, + unit='mm', + ) + for key, value in entities.items() + ], + ) + ] # vim:sw=4:ts=4:et: