Startup value for dashboard Switch node

I have a dashboard Switch node in a flow. Each time I start NR, the Switch node's initial value is OFF. Is there a way I can set the default/startup value to ON without it triggering the next node in the flow?

Hi @k5map

I don't use dashboard much,
but there is a pass through setting, but I believe that effects the ability to make changes on the dashboard - so likely isn't the answer.

However, If I am not mistaken:

  • During your init routines, include a msg.topic.. lets say init, and then ignore any progressive affect in your downstream nodes if that topic is set

Much better folk here than I, if I am incorrect

Example

payload : true | false,
topic: 'init'

@marcus-j-davies ... interesting idea, I had not thought of doing it that way... off to give it a test.

1 Like

Set the switch to not pass through messages.

I tested that - and for me at least it stopped me being able to to make changes in dash.

Screenshot 2024-05-31 at 22.00.15

its either (when disabled)

  • Set the visual state based on input (can't set it during interaction)
  • Set the visual state based on output (can't set it via msg)

(Only)

Unless Im missing something - entirely possible of course :sweat_smile:

Feed the output back to the input. This is the mode I virtually always use. The switch sends its value off to MQTT and then back from MQTT into the input. Then you know the switch has been actioned.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.