Variable instead of fixed value

Hello, is it possible to set a variable instead of the 15?
It would be enough for me if I could define it once in the node.
PS: sorry about my english.
image

Hello @ziege3.0, welcome to the forum.

You can use a flow context variable like this

[{"id":"738166d64cb4d37d","type":"group","z":"601087fc1d806c98","name":"Set a flow context variable","style":{"label":true},"nodes":["03a7f2901b4f1477","4dcc831f0e9b2c1c","360968ba490f25ef","fae5d319b37cb91e"],"x":14,"y":39,"w":392,"h":162},{"id":"03a7f2901b4f1477","type":"inject","z":"601087fc1d806c98","g":"738166d64cb4d37d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":110,"y":80,"wires":[["fae5d319b37cb91e"]]},{"id":"4dcc831f0e9b2c1c","type":"inject","z":"601087fc1d806c98","g":"738166d64cb4d37d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"15","payloadType":"num","x":110,"y":120,"wires":[["fae5d319b37cb91e"]]},{"id":"360968ba490f25ef","type":"inject","z":"601087fc1d806c98","g":"738166d64cb4d37d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":110,"y":160,"wires":[["fae5d319b37cb91e"]]},{"id":"fae5d319b37cb91e","type":"change","z":"601087fc1d806c98","g":"738166d64cb4d37d","name":"","rules":[{"t":"set","p":"trigger","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":120,"wires":[[]]},{"id":"07c2bcb4c11d927b","type":"group","z":"601087fc1d806c98","name":"Test input value","style":{"label":true},"nodes":["3fd1cd7735607ab9","1d7916082075eea5","c3fd0d2098f59f68"],"x":14,"y":219,"w":532,"h":82},{"id":"3fd1cd7735607ab9","type":"debug","z":"601087fc1d806c98","g":"07c2bcb4c11d927b","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":450,"y":260,"wires":[]},{"id":"1d7916082075eea5","type":"switch","z":"601087fc1d806c98","g":"07c2bcb4c11d927b","name":"<= flow.trigger","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"trigger","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":280,"y":260,"wires":[["3fd1cd7735607ab9"]]},{"id":"c3fd0d2098f59f68","type":"inject","z":"601087fc1d806c98","g":"07c2bcb4c11d927b","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"19","payloadType":"num","x":110,"y":260,"wires":[["1d7916082075eea5"]]}]

ps Sorry about my English too, but it's all I've got :upside_down_face:

1 Like