thing [ “Value_in”] << [] (pson & in) {
some c code with no action on “in”
};
On the other side I defined a dashboard with a button widget type: On/Off state.
When I push the button change its state twice, and my c-code is executed 2 times.
How can fix it?
Thanks a lot, now is clear how it works. I tested two solutions, one with inputValue() macro and the other one with is_empty() function and both work.
Another question, i.e. if I use the inputValue(myvar) and myvar is boolean, I can set it by means of a widget ON/OFF type, but if myvar is an integer or a string type, how can I set it from thinger side?
At this moment there are only widgets for on/off and range values based on the slider. We are working on new control widgets. In the meanwhile you could create your own HTML widget using the API, but this is not straightforward.