# How to create a switch (on/off) on my flow

**URL:** <https://discourse.nodered.org/t/how-to-create-a-switch-on-off-on-my-flow/95323>\
**Category:** General\
**Created:** [11 February 2025 15:05 UTC](https://discourse.nodered.org/t/how-to-create-a-switch-on-off-on-my-flow/95323 "2025-02-11T15:05:07Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [11 February 2025 16:09 UTC](https://discourse.nodered.org/t/how-to-create-a-switch-on-off-on-my-flow/95323/13 "2025-02-11T16:09:06Z")

</div>

If the incoming messages are from a mqtt node. You could use dynamic subscription to subscribe and unsubsrcibe at will.  
examples here [Dynamic MQTT LWT birth, Close & Will Property - #2 by Steve-Mcl](https://discourse.nodered.org/t/dynamic-mqtt-lwt-birth-close-will-property/58951/2)

---

_[View the full topic](https://discourse.nodered.org/t/how-to-create-a-switch-on-off-on-my-flow/95323)._
