Node Red Virtual Device Initialization

Firmware: v3.70~49
Node: Virtual Device
Device: Switch
Switch Type: Numeric Input

Can someone walk me thorugh if it is possible to set an initial value to this virtual device? I have tried to set it via an “inject” node with no sucess. I have tried multiple formats, Numeric, JSON, etc.

Anything I send to it results in a “xxx not found in properties” error. Is it possible or implemented in the Beta?

Thanks,

Curt.

One way is to add a switch control node referring to your virtual switch with an initial value as shown below. It would also be possible to send an inject node to this control node. This does override whatever setting you have input on the console if you redeploy so beware.

That did the job. Thank you for pointing that out. When I do this the “slider” does not change it’s display to show the new value. Is there a way to make the displayed value change?

Thank you.

I would have expected back initialisation, it may be a bug, I have moved it to the Venus OS beta thread.

@dfaber is the lack of back initialisation noted above a bug.