//11_07_test_01.js
function transferValue(name, source, destination, controldevice) {
defineRule(name, {
whenChanged: source,
then: function(newValue, devName, cellName) {
dev[destination] = newValue;
dev[controldevice] = 1;
}
});
}
transferValue("rule1_1", "wb-msw-v3_98/CO2", "someDevice/SomeControl_1", "someDevice/Control_1");
transferValue("rule1_2", "wb-msw-v3_60/CO2", "someDevice/SomeControl_2", "someDevice/Control_1");
1 лайк