forked from platypush/platypush
s/sensors/data/g
This commit is contained in:
parent
f137595ba0
commit
c410bd8926
2 changed files with 2 additions and 2 deletions
|
@ -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 + ']');
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue