node-red-contrib-sun-position
node-red-contrib-sun-position copied to clipboard
Rules: blind position does not accept flow context
Describe the bug
Create an empty rule (catchall) and set blind position to some value, say 0.15
. This sets the blind position to 0.15
.
Now save that same value in flow.test
, and set blind position to flow.test
. (I use a persistent context store
for that which survives reloads of the Node-RED flow.) You will get the following error message:
error getting blind level: Cannot set properties of undefined (setting 'flow.#:(store)::test')
Screenshots
Rule definition:
Flow context (the screenshot has another value 0.5
, sorry, just mentally replace it with 0.15
):
This is how it looks if you enter the value 0.15
statically (via "Level entered – 09"):
And finally the error message:
Expected behavior
The blind position should be set to the value of flow.test
, viz. 0.15
.
System information:
- Node Version 3.0.0-alpha1
- Node-Red Version 3.0.2
Additional context
I am actually interested in using the flow context for a minimum override, ideally in a JSONata expression to make the rule generic and divide by 100 to convert from the user input which is denoted in percent. I tried to inject the parameter via a message to read it from msg.test
instead of flow.test
or JSONata $flowContext("test", "store")
, but to no avail.