HEY - absolute NR newbie here. I know how to do this in HA in a template but I want to convert a input_boolean.on_off to a number and I dont know enough about function nodes to work it out.
Essentially I want to pass an ‘on’/‘off’ state of the input bool to the value variable in the modbus:flex write node the value is
Make an “events: state” that react to the change of the boolean.
Then link that node up to a “switch” where one rule is for == (a…z) On and the other rule is for == (a…z) Off.
Then link the outputs to a “change” and set the values for 18 and one for the corresponding outputs from the “switch”.