Closed jimison closed 2 years ago
@jimison - this patch looks great. Thank you!
I'm testing it. Re-reading the docs at https://ibm.co/v2PWSCC
What is your use case for extra precision?
I'm comparing temperatures from various sources, including RPi's and DB18S20 sensors (https://datasheets.maximintegrated.com/en/ds/DS18S20.pdf) for actionable events and notifications. I want the extra precision as long as there's not a polling time trade-off. This API is super handy since my Weather Station posts updates every 5 seconds.
On Mon, Mar 28, 2022 at 9:53 AM John Walicki @.***> wrote:
@jimison https://github.com/jimison - this patch looks great. Thank you!
I'm testing it. Re-reading the docs at https://ibm.co/v2PWSCC
What is your use case for extra precision?
— Reply to this email directly, view it on GitHub https://github.com/johnwalicki/node-red-contrib-twc-weather/pull/10#issuecomment-1080823892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVUISTSD7MU552GDE5UD23VCHIXTANCNFSM5RZPWUMQ . You are receiving this because you were mentioned.Message ID: @.***>
Without &numericPrecision=decimal
{"temp":-1,"heatIndex":-1,"dewpt":-17,"windChill":-6,"windSpeed":14,"windGust":18,"pressure":998.71,"precipRate":0,"precipTotal":0,"elev":37}
With &numericPrecision=decimal
{"temp":-1.2,"heatIndex":-1.2,"dewpt":-16.2,"windChill":-3.9,"windSpeed":7.2,"windGust":11.1,"pressure":998.92,"precipRate":0,"precipTotal":0,"elev":36.9}
Thanks for reading the TWC docs and adding this optional parameter. Merging the PR I will update the changelog, spin a new release, push it to NPM. Good reason to rebase any outdated dependencies too.
@jimison - I am testing v0.5.0 before I npm publish
I am not seeing the expected behavior of msg.twcparams.precision overriding the node edit properties.
Holding on the release until I can debug some more.
I've got a fix.
node-red-contrib-twc-weather:0.5.0 is available on npm
Up and running. 😎
On Mon, Mar 28, 2022 at 12:29 PM John Walicki @.***> wrote:
node-red-contrib-twc-weather:0.5.0 is available on npm
- https://flows.nodered.org/node/node-red-contrib-twc-weather
- https://www.npmjs.com/package/node-red-contrib-twc-weather
— Reply to this email directly, view it on GitHub https://github.com/johnwalicki/node-red-contrib-twc-weather/pull/10#issuecomment-1080998354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVUISRNJ2SWRCZGSRKMBHLVCH3BXANCNFSM5RZPWUMQ . You are receiving this because you were mentioned.Message ID: @.***>
Per issue #8, added numericPrecision option to allow decimal results for various values returned by the API request.