# How can I update a switch status on the dashboard

**URL:** https://discourse.nodered.org/t/how-can-i-update-a-switch-status-on-the-dashboard/14989
**Category:** Dashboard
**Created:** [1 September 2019 04:23 UTC](https://discourse.nodered.org/t/how-can-i-update-a-switch-status-on-the-dashboard/14989 "2019-09-01T04:23:21Z")
**Posts on this page:** 1
**Showing post:** 32

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [5 September 2019 19:09 UTC](https://discourse.nodered.org/t/how-can-i-update-a-switch-status-on-the-dashboard/14989/32 "2019-09-05T19:09:46Z")

</div>

_So I need to change the color of this button to red when it is pressed and to green when it is released_  
Dashboard button doesn't have more events available than **click** (mouse down and mouse up both must happen to fire event). With one public event only you can not have momentary button behavior.

But there is always a way to do it [Momentary button on Dashboard](https://discourse.nodered.org/t/momentary-button-on-dashboard/4906)

---

_[View the full topic](https://discourse.nodered.org/t/how-can-i-update-a-switch-status-on-the-dashboard/14989)._
