# Switch all lights in a room

**URL:** <https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093>\
**Category:** General\
**Created:** [3 August 2020 21:20 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093 "2020-08-03T21:20:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonydarby](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tonydarby](https://discourse.nodered.org/u/tonydarby)\
**Post date:** [3 August 2020 21:20 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/1 "2020-08-03T21:20:25Z")

</div>

Hello, sorry for a probably really stupid question, but having tried for hours I cannot get whole room switching working. I am a complete novice with node-red.  
I am using Node-red in a home assistant setting.  
Have got an inject node connected to a service node and can easily control a single light entity such as light.bed\_ceiling\_1.  
However if I try light.bedceiling to turn them all on I get "Call-Service attempted without connection to server" error in the debug window.  
Can anybody point me to an example of how to turn on/off and entire room/area rather than just one light entity.  
The actual aim is to get presence faker to control whole rooms rather than one light.  
Thanks.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [3 August 2020 22:15 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/2 "2020-08-03T22:15:57Z")

</div>

You would have to group all of the light entities into a single group.

How are you interfacing NR and HA ?

I suggest you look at the Webhooks 3rd party add-in as this exposes all the entity states and other HA objects.

there is also a very good 3rd party add-ins group on the HA forum that has a specific Node Red group for exactly these sort of integration questions.

Craig

Craig

---

<div class="post-metadata">

**Author:** ![tonydarby](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tonydarby](https://discourse.nodered.org/u/tonydarby)\
**Post date:** [4 August 2020 07:15 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/3 "2020-08-04T07:15:52Z")

</div>

Thank you for the reply, I will look at Webhooks.  
I am interfacing Node Red via the add on store so it appears in the HA gui.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [4 August 2020 07:53 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/4 "2020-08-04T07:53:25Z")

</div>

I have been using NR for a couple of years now - i intially started with that and am slowly migrating my devices and front end across to HA.

When i started on the HA journey i did try the integrated HACS module and found lots of little anomalies - so i ended up decoupling it and just point everything to my broker on my VM with NR running on it.

Craig

---

<div class="post-metadata">

**Author:** ![tonydarby](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tonydarby](https://discourse.nodered.org/u/tonydarby)\
**Post date:** [5 August 2020 18:05 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/5 "2020-08-05T18:05:22Z")

</div>

Only been using NR for a month, so far been progressing with just my own research. I have asked this question on the HA forum and am hoping for a reply.

---

<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:** [4 October 2020 18:05 UTC](https://discourse.nodered.org/t/switch-all-lights-in-a-room/31093/6 "2020-10-04T18:05:30Z")

</div>

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