Translations:Rule Examples/220/en

Версия от 21:56, 21 сентября 2022; Matveevrj (обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

if (co2_good) {

           dev["devName/Green LED"] = true;
           dev["devName/Red LED"] = false;
           dev["devName/LED Period (s)"] = 10;
       }
       if (co2_middle) {
           dev["devName/Green LED"] = true;
           dev["devName/Red LED"] = true;
           dev["devName/LED Period (s)"] = 5;
       }
       if (co2_bad) {
           dev["devName/Green LED"] = false;
           dev["devName/Red LED"] = true;
           dev["devName/LED Period (s)"] = 1;
       }
   }

}); </syntaxhighlight>

Max Motion

"Max Motion" - the maximum value of the motion sensor for N time. Time from 1 to 60 seconds can be set in register 282. The default is 10 seconds. When the Max Motion value reaches 50, we check whether the room is sufficiently lit, if not, turn on the light. As soon as the Max Motion value drops below 50, turn off the light.