14. Adding a Button Node
Next, we can drag and drop a button node into the canvas. This will be used to turn on and off the fish tank food dispensary.
Next, double-click on the button node and change the following parameters
In the Label parameter, we will write the following
1
{{payload}}
Copied!
If you experience issues, use
1
{{msg.payload}}
Copied!
In the Background parameter, we will write the following
1
{{colour}}
Copied!
If you experience issues, use
1
{{msg.colour}}
Copied!
In the payload, we will have a string value of
1
press
Copied!
These parameters will allow us to change the color and icons of the button with our logic code that will be implemented in the next step.
Click Done once completed
Last modified 1yr ago
Copy link