FIX: get_measurement should return a dict not a set
This commit is contained in:
parent
72d1b3cd2a
commit
675f899b5f
1 changed files with 2 additions and 3 deletions
|
@ -9,8 +9,7 @@ class SensorEnvirophatBackend(SensorBackend):
|
||||||
|
|
||||||
Requires:
|
Requires:
|
||||||
|
|
||||||
* ``adafruit-mcp3008`` (``pip install adafruit-mcp3008``)
|
* ``envirophat`` (``pip install envirophat``)
|
||||||
* The :mod:`platypush.plugins.gpio.sensor.mcp3008` plugin configured
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, temperature=True, pressure=True, altitude=True, luminosity=True,
|
def __init__(self, temperature=True, pressure=True, altitude=True, luminosity=True,
|
||||||
|
@ -42,7 +41,7 @@ class SensorEnvirophatBackend(SensorBackend):
|
||||||
plugin = get_plugin('gpio.sensor.envirophat')
|
plugin = get_plugin('gpio.sensor.envirophat')
|
||||||
sensors = plugin.get_data(qnh=self.qnh).output
|
sensors = plugin.get_data(qnh=self.qnh).output
|
||||||
ret = {
|
ret = {
|
||||||
sensors[sensor]
|
sensor: sensors[sensor]
|
||||||
for sensor, enabled in self.enabled_sensors.items()
|
for sensor, enabled in self.enabled_sensors.items()
|
||||||
if enabled and sensor in sensors
|
if enabled and sensor in sensors
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue