Commit 3591c14c authored by fionera's avatar fionera Committed by root

Add people_now_present to spaceapi

parent 1d82202c
Pipeline #107 failed with stages
......@@ -61,7 +61,11 @@ var spaceanswer = {
description: "overall power consumption from our space",
location: "basement",
value: 0
}]
}],
people_now_present: [{
value: 0,
names: []
}]
}
};
var simpleanswer = {state: "unknown", count: 0, names: [], lastchange: 0, power: 0};
......@@ -82,6 +86,9 @@ ctdoapi.on('done', function (answer) {
simpleanswer.count = answer.count;
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) {
usercountanswer.datapoints.shift();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment