Rule Examples/en: различия между версиями
Matveevrj (обсуждение | вклад) (Новая страница: «function checkSchedule(schedule, now) { if (now == undefined) { now = new Date(); }») |
Matveevrj (обсуждение | вклад) (Новая страница: «<syntaxhighlight lang="js"> defineVirtualDevice("Termostat", { title: "Termostat", cells: { // =============== hallway underfloor heating "R01-TS16-1-mode": {//mode 0-manual 1-scheduled type: "switch", value: false, }, "R01-TS16-1-setpoint": {//setting type: "range", value: 25, max: 30, readonly: false }, "R01-TS16-1-lock": {//blockage in visualization 0-unlocked 1-blocked typ...») |
||
Строка 1227: | Строка 1227: | ||
}); | }); | ||
// position controller works at night | |||
// | |||
defineRule("heatersNightOff", { | defineRule("heatersNightOff", { | ||
when: function() { | when: function() { | ||
Строка 1235: | Строка 1234: | ||
then: function (newValue, devName, cellName) { | then: function (newValue, devName, cellName) { | ||
log("heatersNightOff newValue={}, devName={}, cellName={}", newValue, devName, cellName); | log("heatersNightOff newValue={}, devName={}, cellName={}", newValue, devName, cellName); | ||
heater1EnableInverted = !false; // | heater1EnableInverted = !false; // inverted | ||
} | } | ||
}); | }); | ||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |