# Action depending status Philips Hue lamp

**URL:** <https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095>\
**Category:** General\
**Created:** [22 November 2021 10:04 UTC](https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095 "2021-11-22T10:04:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [22 November 2021 10:04 UTC](https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095/1 "2021-11-22T10:04:49Z")

</div>

I use the Hue Magic node and it works fine. Now I want to perform an action on a Hue lamp but only if that lamp is turned OFF. For that I suspect that I have to request the status of that lamp and then do or not perform an action.

Am I correct? Does anyone know how to do that?

---

<div class="post-metadata">

**Author:** ![GeorgeCastanza](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgecastanza/32/40766_2.png) [@GeorgeCastanza](https://discourse.nodered.org/u/GeorgeCastanza)\
**Post date:** [23 November 2021 06:44 UTC](https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095/2 "2021-11-23T06:44:09Z")

</div>

Put this node downstream of your hue light node (the blue node). And feed in a message into the Hue node.

```auto
[{"id":"abedba80.68ce98","type":"switch","z":"e12eb721.e01ba8","name":"Light","property":"payload.on","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":740,"wires":[["203f2e26.f397d2"],["f33350f1.cfd01","9494a6e5.6e54b8"]]}]

```

---

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [23 November 2021 09:04 UTC](https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095/3 "2021-11-23T09:04:24Z")

</div>

It works! I looked for the solution in the Hue node and did not think about solving it this way. Thanks for your help George.

---

<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:** [7 December 2021 09:04 UTC](https://discourse.nodered.org/t/action-depending-status-philips-hue-lamp/54095/4 "2021-12-07T09:04:29Z")

</div>

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