# Problem hue dimmer switch

**URL:** <https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174>\
**Category:** General\
**Created:** [24 September 2022 12:02 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174 "2022-09-24T12:02:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kroonp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kroonp/32/68249_2.png) [@kroonp](https://discourse.nodered.org/u/kroonp)\
**Post date:** [24 September 2022 12:02 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/1 "2022-09-24T12:02:55Z")

</div>

I have installed hue magic in home assistant . When I use the node (hue-buttons) and I press the upper button from my hue switch gives in the debug node:

_object_  
reachable: true  
connectionStatus: "connected"  
button: 1  
action: "initial\_press"  
updated: "2022-09-24T10:53:45+02:00"

When I want to use a switch node and I use (payload)-initial\_press no result  
Houw should I handle the output shown above??  
Thanks

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [24 September 2022 12:24 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/2 "2022-09-24T12:24:45Z")

</div>

> I use (payload)-initial\_press no result

what does this mean exactly ?

---

<div class="post-metadata">

**Author:** ![kroonp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kroonp/32/68249_2.png) [@kroonp](https://discourse.nodered.org/u/kroonp)\
**Post date:** [24 September 2022 13:01 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/3 "2022-09-24T13:01:56Z")

</div>

> [@kroonp](#):
>
> action: "initial\_press"

The debug output from the button node gives action: "initial\_press”.

When I place a switch node with Property msg.payload.action == initial\_press, nothing happens.

So I’m new to this and don’t know how the switch should be filled in.

---

<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:** [24 September 2022 13:12 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/4 "2022-09-24T13:12:54Z")

</div>

The info you posted is not clear, you need to use the copy value button in the debug sidebar, it shows when you hover the mouse to the side of the object name.  
I suuspect it is `msg.action` you should be using in the switch node property input.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [24 September 2022 13:27 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/5 "2022-09-24T13:27:14Z")

</div>

How are you actually sending this to whatever you are trying to control with the switch. An example of your flow would help.

---

<div class="post-metadata">

**Author:** ![kroonp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kroonp/32/68249_2.png) [@kroonp](https://discourse.nodered.org/u/kroonp)\
**Post date:** [24 September 2022 14:24 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/7 "2022-09-24T14:24:41Z")

</div>

```auto
[{"id":"ca6d10a6af7d8fe3","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"2d0723d4f16fad9f","type":"hue-buttons","z":"ca6d10a6af7d8fe3","name":"SW3 Slaapkamer","bridge":"3bcb6ec844b055e7","sensorid":"08a1e3d3-0dbf-43ca-82b1-869838bbfe6e","skipevents":false,"initevents":false,"x":350,"y":220,"wires":[["ebaa080f80519f28"]]},{"id":"ebaa080f80519f28","type":"switch","z":"ca6d10a6af7d8fe3","name":"action","property":"pressed.button","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"initial_press","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":220,"wires":[["33e9a566dc68ba43","ebc5baf4959b35af"],["c2a2074ce3c4377b"]]},{"id":"33e9a566dc68ba43","type":"debug","z":"ca6d10a6af7d8fe3","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":200,"wires":[]},{"id":"c2a2074ce3c4377b","type":"debug","z":"ca6d10a6af7d8fe3","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":760,"y":240,"wires":[]},{"id":"ebc5baf4959b35af","type":"api-call-service","z":"ca6d10a6af7d8fe3","name":"Put lamp on if button 1 is pressed","server":"3c6b2d2d.b63e72","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.wand_tuindeur"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":160,"wires":[[]]},{"id":"3bcb6ec844b055e7","type":"hue-bridge","name":"Philips hue","bridge":"192.168.178.86","key":"19HWVn7M1WGrt4IcXh9aYkUogHcAivi87gf8QRFe","worker":"10","autoupdates":true,"disableupdates":false},{"id":"3c6b2d2d.*emphasized text*b63e72","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

```

---

<div class="post-metadata">

**Author:** ![kroonp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kroonp/32/68249_2.png) [@kroonp](https://discourse.nodered.org/u/kroonp)\
**Post date:** [24 September 2022 20:58 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/8 "2022-09-24T20:58:20Z")

</div>

Is the example oké?

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [24 September 2022 21:35 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/9 "2022-09-24T21:35:07Z")

</div>

Erm, no. Syntax error. Try posting flow between three backticks (```)

As you can see in posted flow there are a lot of unknown elements (the little squares)

---

<div class="post-metadata">

**Author:** ![kroonp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kroonp/32/68249_2.png) [@kroonp](https://discourse.nodered.org/u/kroonp)\
**Post date:** [24 September 2022 22:17 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/10 "2022-09-24T22:17:25Z")

</div>

I've been looking for a long time. I have now found the errors and reset everything. It now works as intended. Thanks for the help.  
Peter

---

<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:** [23 November 2022 22:18 UTC](https://discourse.nodered.org/t/problem-hue-dimmer-switch/68174/11 "2022-11-23T22:18:15Z")

</div>

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