Command delay parameter broken?

Has something been changed with the delay parameter for commands? I haven’t changed anything on my end but they seem to have stopped working. Anyone have any ideas?

Example from the docs:

mySwitch.on([delay: 2000])

Trying this out in a bare bones app just to test, my switch doesn’t turn off at all.

Same here. Broken around the time ST announced their new scheduler introduction. Probably a side effect of that.

Well, it is clearly a bug that was introduced after their latest changes. And I figured out a workaround for now.

That parameter that you have for the delay you have to divide it by a number around 500 and you will get the behavior that is expected. I cannot tell you the exact correction factor but 500 works for me. So basically the old code becomes:

mySwitch.on([delay: 2000 / 500])

1 Like

Known issue, discussed on a couple of forum threads. Milliseconds are being processed as seconds. (So a factor of 1,000 for now.) ST is aware of it, so there should be a fix eventually.

@bravenel or @rboy might remember where it was previously discussed.

1 Like

Interesting, was not aware but that does explain a lot of what I’m seeing. Through I’m super curious as to why ST would break such a fundamental things and not fix it right away! Poor SDLC for even letting something as basic as this come in. I wonder if anyone even does code reviews or it’s a free for all?

I am trying hard to to say something here. It most definitely says a lot about certain things…

Yup I raised it in the thread below. A fix is imminent and it’s the single biggest cause if the issues I have been having

1 Like

ok maybe not so imminent, seems the deployment of the fix has been delayed for a little longer.

I forgot to post but they finally fixed it 2-3 weeks back. I changed all my apps back to what the official docs specify and they work fine now.

1 Like