You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot use environment variable as deadband value inside a subflow #6047
A filter node inside of a subflow with "change greater or equal" set and ${ENV_VAR} entered as the value will throw the following error as soon as it's deployed:
TypeError: this.gap.substr is not a function
at new RbeNode (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/function/rbe.js:11:22)
at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:211:27)
at Subflow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:261:54)
Expected Behavior
Variable substitution should work just the same as in other nodes.
I am not seeing the issue when I import your flow (which is only an rbe node, not in a subflow). Even when I put it in a subflow I do not see the problem.
I can replicate it now. The problem goes away if you make the env var value a string rather than a number. I suspect that the node does not allow for the fact that the value might come from an env var, and hence it could be a number rather than a string.
Activity
colinl commentedon Oct 29, 2026
I am not seeing the issue when I import your flow (which is only an rbe node, not in a subflow). Even when I put it in a subflow I do not see the problem.
xieve commentedon Oct 29, 2026
I've updated the example flow to actually be an example flow.
Edit: Sorry, yeah, the subflow has to have the environment variable in its config. I hope it should be reproducible now.
Another edit: The subflow has to be present inside another flow, that is now also part of the example
colinl commentedon Oct 29, 2026
I can replicate it now. The problem goes away if you make the env var value a string rather than a number. I suspect that the node does not allow for the fact that the value might come from an env var, and hence it could be a number rather than a string.