From 675f899b5f1074b25034feab5f1150d11c4dc4f7 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 1 Aug 2019 23:17:04 +0200 Subject: [PATCH] FIX: get_measurement should return a dict not a set --- platypush/backend/sensor/envirophat.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platypush/backend/sensor/envirophat.py b/platypush/backend/sensor/envirophat.py index e261c991..03f9cbc5 100644 --- a/platypush/backend/sensor/envirophat.py +++ b/platypush/backend/sensor/envirophat.py @@ -9,8 +9,7 @@ class SensorEnvirophatBackend(SensorBackend): Requires: - * ``adafruit-mcp3008`` (``pip install adafruit-mcp3008``) - * The :mod:`platypush.plugins.gpio.sensor.mcp3008` plugin configured + * ``envirophat`` (``pip install envirophat``) """ def __init__(self, temperature=True, pressure=True, altitude=True, luminosity=True, @@ -42,7 +41,7 @@ class SensorEnvirophatBackend(SensorBackend): plugin = get_plugin('gpio.sensor.envirophat') sensors = plugin.get_data(qnh=self.qnh).output ret = { - sensors[sensor] + sensor: sensors[sensor] for sensor, enabled in self.enabled_sensors.items() if enabled and sensor in sensors }