Translations:Rule Examples/221/en: различия между версиями
Matveevrj (обсуждение | вклад) (Новая страница: «<div class="NavFrame"> <div class="NavContent"> <syntaxhighlight lang="ecmascript"> defineRule("msw3_Motion", { whenChanged: "wb-msw-v3_97/Max Motion", then: function(newValue, devName, cellName) { if (newValue > 50) { if (dev["wb-msw-v3_97"]["Illuminance"] < 50) { dev["wb-mr3_11"]["K1"] = true; } } else { dev["wb-mr3_11"]["K1"] = false; } } }); </syntaxhighlight> </div...») |
Matveevrj (обсуждение | вклад) |
||
Строка 6: | Строка 6: | ||
then: function(newValue, devName, cellName) { | then: function(newValue, devName, cellName) { | ||
if (newValue > 50) { | if (newValue > 50) { | ||
if (dev["wb-msw-v3_97 | if (dev["wb-msw-v3_97/Illuminance"] < 50) { | ||
dev["wb-mr3_11 | dev["wb-mr3_11/K1"] = true; | ||
} | } | ||
} else { | } else { | ||
dev["wb-mr3_11 | dev["wb-mr3_11/K1"] = false; | ||
} | } | ||
} | } |
Текущая версия на 21:57, 21 сентября 2022
defineRule("msw3_Motion", {
whenChanged: "wb-msw-v3_97/Max Motion",
then: function(newValue, devName, cellName) {
if (newValue > 50) {
if (dev["wb-msw-v3_97/Illuminance"] < 50) {
dev["wb-mr3_11/K1"] = true;
}
} else {
dev["wb-mr3_11/K1"] = false;
}
}
});