Rule Examples/en: различия между версиями
Matveevrj (обсуждение | вклад) |
Matveevrj (обсуждение | вклад) |
||
Строка 600: | Строка 600: | ||
}); | }); | ||
defineRule("_system_dc_off", { | defineRule("_system_dc_off", { | ||
asSoonAs: function () { | asSoonAs: function () { | ||
return dev["wb-adc | return dev["wb-adc/Vin"] <= dev["wb-adc/BAT"]; | ||
}, | }, | ||
then: function () { | then: function () { | ||
dev["power_status | dev["power_status/working on battery"] = true; | ||
} | } | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> |