From f06a851b61979365983e884d9afcabc591a5c7f1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 1 Aug 2019 23:23:13 +0200 Subject: [PATCH] Accelerometer and magnometer reads should be dict not set --- platypush/plugins/gpio/sensor/envirophat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/gpio/sensor/envirophat.py b/platypush/plugins/gpio/sensor/envirophat.py index 0e8b3f40bf..f9b60e76b3 100644 --- a/platypush/plugins/gpio/sensor/envirophat.py +++ b/platypush/plugins/gpio/sensor/envirophat.py @@ -60,8 +60,8 @@ class GpioSensorEnvirophatPlugin(GpioSensorPlugin): ret['pressure'] = weather.pressure() ret['altitude'] = weather.altitude(qnh=qnh) ret['luminosity'] = light.light() - ret['accelerometer'] = {getattr(accelerometer, v) for v in ['x', 'y', 'z']} - ret['magnetometer'] = {getattr(magnetometer, v) for v in ['x', 'y', 'z']} + ret['accelerometer'] = {v: getattr(accelerometer, v) for v in ['x', 'y', 'z']} + ret['magnetometer'] = {v: getattr(magnetometer, v) for v in ['x', 'y', 'z']} ret['analog'] = list(analog.read_all()) ret['leds'] = leds.is_on()