# Can I reset the ui\_switch from "extern"?

**URL:** https://discourse.nodered.org/t/can-i-reset-the-ui-switch-from-extern/72477
**Category:** Dashboard
**Tags:** node-red-dashboard
**Created:** [20 December 2022 14:51 UTC](https://discourse.nodered.org/t/can-i-reset-the-ui-switch-from-extern/72477 "2022-12-20T14:51:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ctechch](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ctechch/32/72927_2.png) [@ctechch](https://discourse.nodered.org/u/ctechch)
#### Post date: [20 December 2022 14:51 UTC](https://discourse.nodered.org/t/can-i-reset-the-ui-switch-from-extern/72477/1 "2022-12-20T14:51:53Z")

</div>

UseCase:

Toggle switch on UI =\> Deactivating by MobilePhon over MQTT  
=\> the Status on ui\_switch remains unchanged (active)

or:

Activated by MobilePhon over MQTT  
=\> the Status on ui\_switch remains unchanged (inactive)

Is there any way that the status can be tracked on the ui\_switch?

Kind regards  
Chris

---

<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: [20 December 2022 15:12 UTC](https://discourse.nodered.org/t/can-i-reset-the-ui-switch-from-extern/72477/2 "2022-12-20T15:12:24Z")

</div>

Hi and welcoome.  
You can set the switch to react on input.  
Here is an example, copy it, press ctrl in editor and paste the example and press import.

```auto
[{"id":"29c91446b812e54e","type":"inject","z":"da8a6ef0b3c9a5c8","name":"mqtt true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"a/topic","payload":"true","payloadType":"bool","x":200,"y":420,"wires":[["d43e6a72a6fb31d6"]]},{"id":"d43e6a72a6fb31d6","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":405,"y":460,"wires":[["6dee0b3683ed12f7","80358c1d54a72b8a"]],"l":false},{"id":"6dee0b3683ed12f7","type":"ui_switch","z":"da8a6ef0b3c9a5c8","name":"","label":"switch","tooltip":"","group":"2d4fe667.28f8ba","order":17,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"className":"","x":530,"y":460,"wires":[["d43e6a72a6fb31d6"]]},{"id":"5514bb6c2134ef26","type":"inject","z":"da8a6ef0b3c9a5c8","name":"mqtt false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"a/topic","payload":"false","payloadType":"bool","x":200,"y":480,"wires":[["d43e6a72a6fb31d6"]]},{"id":"80358c1d54a72b8a","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 115","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":590,"y":400,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [19 January 2023 15:12 UTC](https://discourse.nodered.org/t/can-i-reset-the-ui-switch-from-extern/72477/3 "2023-01-19T15:12:50Z")

</div>

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