alisdairjsmyth / node-red-contrib-lifx-api

A collection of Node-RED nodes to control LIFX globes using the HTTP Remote Control API
Apache License 2.0
8 stars 5 forks source link

Fixed invalid brightness issue #9

Closed j-waters closed 6 years ago

j-waters commented 6 years ago

I started getting the following error: "brightness does not have a valid value" despite definitely entering a number between 0 and 1 in the brightness field. This only started happening a few days ago, and the module was working perfectly until then, so I don't know what changed.

This is a quick and dirty fix, but it works for me. Perhaps there should be a validity check on all the config options, so that errors like this get caught before any HTTP requests are sent.