Temperature errors sensor filtering #37

Merged
senaduka merged 6 commits from temperature_errors_sensor_filtering into master 2017-01-07 13:34:22 +01:00
Showing only changes of commit 977fb6c809 - Show all commits

View File

@@ -214,7 +214,8 @@ reactToAlarmData = function(controller_id) {
};
var temperatures = (reading.temperatures || []).filter(function(temperature, index) {
return Meteor.zoblak.shared.valid_temperature(temperature) && config.sensorsEnabled[index];
var is_on = (index in config.sensorsEnabled)?config.sensorsEnabled[index]: true;
return Meteor.zoblak.shared.valid_temperature(temperature) && is_on;
});