diff --git a/platypush/backend/http/static/js/plugins/sensors/index.js b/platypush/backend/http/static/js/plugins/sensors/index.js index 341b4deb5..d5bfbf7c5 100644 --- a/platypush/backend/http/static/js/plugins/sensors/index.js +++ b/platypush/backend/http/static/js/plugins/sensors/index.js @@ -52,7 +52,9 @@ Vue.component('sensors', { onSensorEvent: function(event) { const data = event.data; - this.metrics[data.name] = data.value; + for (const [name, value] of Object.entries(data)) { + this.metrics[name] = value; + } }, },