Add people_now_present to spaceapi
This commit is contained in:
parent
1d82202cd3
commit
3591c14c56
|
@ -61,6 +61,10 @@ var spaceanswer = {
|
||||||
description: "overall power consumption from our space",
|
description: "overall power consumption from our space",
|
||||||
location: "basement",
|
location: "basement",
|
||||||
value: 0
|
value: 0
|
||||||
|
}],
|
||||||
|
people_now_present: [{
|
||||||
|
value: 0,
|
||||||
|
names: []
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -82,6 +86,9 @@ ctdoapi.on('done', function (answer) {
|
||||||
simpleanswer.count = answer.count;
|
simpleanswer.count = answer.count;
|
||||||
simpleanswer.names = answer.names;
|
simpleanswer.names = answer.names;
|
||||||
|
|
||||||
|
spaceanswer.sensors.people_now_present.value = answer.count;
|
||||||
|
spaceanswer.sensors.people_now_present.value = answer.names;
|
||||||
|
|
||||||
if (usercountanswer.datapoints.length > 20) {
|
if (usercountanswer.datapoints.length > 20) {
|
||||||
usercountanswer.datapoints.shift();
|
usercountanswer.datapoints.shift();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue