diff --git a/docs/autoexecExamples.md b/docs/autoexecExamples.md index f75357458..425a7d288 100644 --- a/docs/autoexecExamples.md +++ b/docs/autoexecExamples.md @@ -453,6 +453,36 @@ publish myVariable 2022 ``` +WaitFor advanced syntax. +
+``` + +// Waitfor syntax samples +// WaitFor can support following operators: +// - no operator (default, it means equals) +// - operator < (less) +// - operator > (more) +// - operator ! (not requal) + +// default usage - wait for NoPingTime to reach exact value 100 +waitFor NoPingTime 100 + +// extra operator - wait for NoPingTime to become less than 100 +// (this will be triggered anytime variable changes to value less than 100) +waitFor NoPingTime < 100 + +// extra operator - wait for NoPingTime to become more than 100 +// (this will be triggered anytime variable changes to value more than 100) +waitFor NoPingTime > 100 + +// extra operator - wait for NoPingTime to become different than 100 +// (this will be triggered anytime variable changes to value other than 100) +waitFor NoPingTime ! 100 + + +``` + + This script will use NTP and 'addClockEvent' to change light styles in the morning and in the evening. Here you can see how 'waitFor NTPState 1' and 'addClockEvent' and $hour script functions/variables are used.
```