The dashboard switch
node.
As hard as I am trying I can't get my head around:
In pass through mode the switch state can be updated by an incoming
msg.payload
with the specified values, that must also match the specified type (number, string, etc). When not in passthrough mode then the icon can either track the state of the output - or the input msg.payload, in order to provide a closed loop feedback.
I have one of these nodes and on boot (if/when) it needs to be set to a default value/state.
But I am trying, but not succeeding in getting it working.
This is what I have:
[{"id":"b65e3427.d0f1a","type":"ui_switch","z":"b9924a74.4d98f8","name":"","label":"On/Off","tooltip":"","group":"4a387253.a6300c","order":32,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"open","onvalueType":"str","onicon":"","oncolor":"","offvalue":"close","offvalueType":"str","officon":"","offcolor":"","x":870,"y":990,"wires":[[]]},{"id":"37cfbf3a.73feb","type":"inject","z":"b9924a74.4d98f8","name":"","topic":"","payload":"open","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":960,"wires":[["b65e3427.d0f1a"]]},{"id":"69aef393.5aa95c","type":"inject","z":"b9924a74.4d98f8","name":"","topic":"","payload":"close","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":1030,"wires":[["b65e3427.d0f1a"]]},{"id":"4a387253.a6300c","type":"ui_group","z":"","name":"SPARE","tab":"de5134a7.f0a0d","order":3,"disp":true,"width":"6","collapse":false},{"id":"de5134a7.f0a0d","type":"ui_tab","name":"Tab 6","icon":"dashboard","order":5}]
But am missing that illusive elephant.
To clarify:
I want this as an INPUT. Just I also want to set the default state at boot by injecting a message.
I have since seen I can alter a setting and the switch
indicates the condition of the input.
Not really much good if I want to use the switch
as an input device, as it now can't be clicked on to toggle its condition.
(Typically)
After posting the question I got it working.
See next post