Expression [MethodCallExpression] is not allowed: this.sleep

  1. Why is something simple like sleep(500) not allowed in an app?
  2. Can this be enabled?

Use pauseExecution(ms)

1 Like

Thanx a lot! :+1:

But where can I find such important information (e.g which standard classes/methods are forbidden and which alternatives are defined)?

I can't count the number of times I haven't been able to find documentation for some topic, (not just Hubitat related, but life long.)

Once I get the answer, it's easy to go find that answer.. the documentation is there, but it really boils down to me not knowing the right spelling of what to look for. If I knew what I didn't know, I could know how to find it. :smiley:


Related to the above, this would help with that specific question:

The "Common Methods" page has methods that are available for use in both apps and drivers. You'll also see specific pages for methods only available to apps or drivers. And probably a lot more that isn't documented as clearly at the moment, but this should help a little. :slight_smile:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.