# Looking for a relay switch function

**URL:** https://discourse.nodered.org/t/looking-for-a-relay-switch-function/3065
**Category:** General
**Created:** [12 September 2018 02:38 UTC](https://discourse.nodered.org/t/looking-for-a-relay-switch-function/3065 "2018-09-12T02:38:56Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![chris1988](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@chris1988](https://discourse.nodered.org/u/chris1988)
#### Post date: [15 September 2018 01:43 UTC](https://discourse.nodered.org/t/looking-for-a-relay-switch-function/3065/16 "2018-09-15T01:43:10Z")

</div>

> [@Zwave day night auto dimming with times and max brightness hassio](https://discourse.nodered.org/t/zwave-day-night-auto-dimming-with-times-and-max-brightness-hassio/3157):
>
> Hello have a look and see what you all think if someone could do the join node better but it works, also anyway of simplifying it i have 24 ways to do on these [{"id":"b84a7f9a.24408","type":"server-events","z":"cf1115c.2dcd6e8","name":"HA All Events","server":"d0be6c93.2903a","x":110,"y":140,"wires":[["fd7c9ec6.5f502"]]},{"id":"29e7db9a.11e0a4","type":"function","z":"cf1115c.2dcd6e8","name":"Brightness Value","func":"var temp=msg.payload.event.new\_state.attributes.brightness;\nvar msg = {pay…

still havent got the relay tho 😫

---

_[View the full topic](https://discourse.nodered.org/t/looking-for-a-relay-switch-function/3065)._
