parnic / node-screenlogic

Pentair ScreenLogic Javascript library using Node.JS
https://www.npmjs.com/package/node-screenlogic
MIT License
52 stars 14 forks source link

FEATURE: Set Timeout #71

Closed thatsjet closed 1 year ago

thatsjet commented 1 year ago

Hey, really love the work here.

I'm writing an Alexa skill that controls various features and find that some are slower than others to respond with state confirmation. Would be super rad if we could set a config on the constructor to set a timeout vs. the default 2300ms.

parnic commented 1 year ago

Have you seen how the example script handles a unit coming in immediately instead of awaiting the entire timeout? I agree it would be nice to be able to adjust the timeout, but perhaps the other mode would be more future-proof for you where it would work regardless of how slow or fast the unit responds.

thatsjet commented 1 year ago

No, but I'll check that out. Thanks!

thatsjet commented 1 year ago

Actually, my bad. I was calling circuits.setCircuitStateAsync() without await. Added await and it finishes fine.

parnic commented 1 year ago

Great!