Looking for some help on writing a function node.
i have a variable hbtset which i need to increase or decrease from either buttons on a dash board or in the flow elswhere. on pressing the button on the dash i want to send true or false to incrment or decrement the value by one, something like below, any hel please appreciated
// get values
var hbtset = flow.get("hbtset");
if (msg.topic = hbtset && msg.payload = true)
var hbtsetnew = hbtset+1;
var hbtset = hbtsetnew