# Pass on entity-id to service call node

**URL:** https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412
**Category:** General
**Tags:** home-assistant
**Created:** [28 January 2022 15:22 UTC](https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412 "2022-01-28T15:22:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rkluijt](https://avatars.discourse-cdn.com/v4/letter/r/c77e96/32.png) [@rkluijt](https://discourse.nodered.org/u/rkluijt)
#### Post date: [28 January 2022 15:22 UTC](https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412/1 "2022-01-28T15:22:00Z")

</div>

Hi all,

I have a question.  
I have several motion sensors in and around my house. I would like to make a sequence that when there is motion a specific light turns on.  
So I have state node with substring motion. What I would like is that when motion sensor X has detected movement it will turn on light X. to keep the sequence as small as possible I only like to use one "service call node". Is there a way to pass on the entity-id from node one to the service call node?

Thanks in advance

Kind regards  
Robin

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 January 2022 15:35 UTC](https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412/2 "2022-01-28T15:35:50Z")

</div>

Welcome to the forum @rkluijt

Unfortunately your question is about Home Assistant specific nodes. Few here use HA so you might be better asking your question on a HA forum.

---

<div class="post-metadata">

### Author: ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)
#### Post date: [28 January 2022 17:49 UTC](https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412/3 "2022-01-28T17:49:42Z")

</div>

You should be able to pass a value as msg.entity\_id or msg.payload.entity\_id to the call service node.

---

<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: [29 March 2022 17:50 UTC](https://discourse.nodered.org/t/pass-on-entity-id-to-service-call-node/57412/4 "2022-03-29T17:50:37Z")

</div>

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