I've spotted an annoying problem with node-red-contrib-google-smarthome where the node config has two options, selectable via a tick box;
The first option is to use google authentication (preferred option)
The second option, by unticking the box, users can use a simple password
The problem is that if the first option is selected (Google login), the second option's input boxes would be left blank (as we aren't using the second option).
But because they are blank, node-RED will not verify the input boxes, and as you can see in the screenshot above, node-RED colours the input box outlines red, places a red triangle on the node, and a popup saying that the node is not correctly configured (despite option 1 being selected).
I've tried adding a input box placeholder for the fields, which didn't help, and have opened an issue with the author, but wondered if anyone knows the best way to deal with this pls?
As I said above, I've read the documentation, but the example given in the docs is quite complex, and does not describe the context of how it's implemented.
I've also looked at a number of contrib nodes for a basic example, but it appears to be rarely used.
Paul,
Unfortunately I cannot check their npm version now ...
But looking at their github demo version code, I would expect their current existing validation function to work correctly at first sight. Since it already takes into account the checkbox value. Perhaps this is not available in your npm version yet??
Thanks Bart, I'm using npm v6.14.11, tried on 2 machines, and the author can also replicate the issue.
Using the current version of smarthome (v0.0.64), the validation is throwing up the warning (screenshots in the git issue).
I guess I'll leave it to someone more competent than me to fix
I was just trying to contribute and learn a little along the way...
No worries, I'm sure it will get fixed.
You have helped me by pointing me to the validation functions, at least I can now see how validation should work!