From c410bd8926910a66c629d9e8ca9c64bcfaaa1008 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 12 Jun 2018 00:23:41 +0200 Subject: [PATCH] s/sensors/data/g --- platypush/backend/http/static/js/gpio.sensor.mcp3008.js | 2 +- platypush/backend/sensor/mcp3008.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/static/js/gpio.sensor.mcp3008.js b/platypush/backend/http/static/js/gpio.sensor.mcp3008.js index f81571cd4..5c864cd07 100644 --- a/platypush/backend/http/static/js/gpio.sensor.mcp3008.js +++ b/platypush/backend/http/static/js/gpio.sensor.mcp3008.js @@ -4,7 +4,7 @@ $(document).ready(function() { var onEvent = function(event) { switch (event.args.type) { case 'platypush.message.event.sensor.SensorDataChangeEvent': - var data = event.args.sensors; + var data = event.args.data; for (var sensor of Object.keys(data)) { var $sensor = $container.find('[data-sensor-type=' + sensor + ']'); diff --git a/platypush/backend/sensor/mcp3008.py b/platypush/backend/sensor/mcp3008.py index d7abe277d..d49952355 100644 --- a/platypush/backend/sensor/mcp3008.py +++ b/platypush/backend/sensor/mcp3008.py @@ -36,7 +36,7 @@ class SensorMcp3008Backend(Backend): new_measurement[key] = measurement[key] if new_measurement: - self.bus.post(SensorDataChangeEvent(sensors=new_measurement)) + self.bus.post(SensorDataChangeEvent(data=new_measurement)) self.last_measurement = measurement time.sleep(self.poll_seconds)