Материал из Module developer
Перейти к: навигация, поиск

//Создание условия с Default var l_oCondition = l_oSubDevice.AddCondition("Temperature is below...", "Drivers.Nest.CurrentTemperature", true, function(in_data){

var l_nValue = parseInt(in_data, 10); //получаем in_data в числовом виде var l_nFeedback = parseInt(l_oSubDevice.GetFeedback("CurrentTemperature"), 10); //получаем feedback в числовом виде // производим сравнение if (l_nFeedback < l_nValue) return true;

}, this, "23"); //Создание условия с IR.ADVANCED_NUMBER var l_oCondition = l_oSubDevice.AddCondition("Temperature is below...", "Drivers.Nest.CurrentTemperature", true, function(in_data){