Turn off Multiple Lights Simultaneously

I have multiple (5) z-wave controlled lights in my basement. I am trying to find a way to switch off all of these lights simultaneously. I have tried multiple ways without success:

  • In the automation, list each device
  • Group the lights and reference this group in the automation

In both cases the lights turn off one-by-one. I want the lights to all turn off at the same time.

Edit: shouldn’t a Group work? According to the documentation:

The group integration lets you combine multiple entities into a single entity. Entities that are members of a group can be controlled and monitored as a whole.

So why are the lights turned off individually when using an automation to turn off the group???

I do not know about zwave but in Insteon world you have to create a scene in the Insteon controller/hub and use an HA service “insteon.scene_off”. HA is going to send commands one by one to the device.

Thanks! I will look into using a scene.

Edit: no-go using a scene.

Try a parallel

You won’t get the desired simultaneity you want if you tried using Home Assistant’s Scene.

You must create a native Z-Wave group or scene then use Home Assistant to control the native Z-Wave group/scene. The members of a native Z-Wave group receive the single, broadcasted command simultaneously. This concept of native group/scene is also supported by other lighting technologies (ZigBee, Insteon, UPB, etc).

Thank you, I’ll see what I can find.

I don’t use Z-Wave but try poking around in the Z-Wave integration for ‘Node group associations’.

1 Like

I setup a parallel script with an action to turn off all of the 5 lights. Unfortunately, each of the lights still turns off one-by-one with a noticeable delay between each.

No such option with Z-Wave JS. I don’t really want to install an setup zwave2mqtt just for this…

Because all of the parallel commands still funnel into the single Z-Wave integration and it handles each one individually (i.e. all parallel requests are queued and transmitted one after the other).

There’s some way to do it but I don’t know how because I don’t use Z-Wave (all I know is that Z-Wave supports “group associations”). Hopefully someone else with Z-Wave experience can help you with the details.

FWIW, I tried searching for an answer but received many responses dated 2 years ago and I believe they’re stale because the Z-Wave integration has changed since then.

1 Like

You can do an association but I don’t know if z-wave js handles the associations. Looking quickly, I couldn’t find it for many of my devices. It will still not be in parallel as the device will communicate to the next device to turn on or off and so forth. It is faster but it is still not in parallel. I used this feature when I was operating on HomeSeer.

I have 8 lights in my Bar that are controlled by switch and motion. There are both light and switch devices. Below is how I control the lighting. It takes 1-2 seconds to turn on all the lights. I use a 500 series controller without any range extension.

- id: '1630948539368'
  alias: Bar Lights - Turn on and off based on stairwell light.
  description: Turn on and off all the lights in the bar area
  trigger:
    - id: 'bar_on'
      platform: state
      entity_id: binary_sensor.bar_stairwell_motion_sensor_motion
      from: 'off'
      to: 'on'
    - id: 'bar_on'
      platform: state
      entity_id: binary_sensor.shellymotionsensor_60a42395fc6a_motion
      from: 'off'
      to: 'on'
    - id: 'bar_on'
      platform: state
      entity_id: binary_sensor.bar_main_motion_sensor_motion
      from: 'off'
      to: 'on'
    - id: 'bar_on'
      platform: state
      entity_id: binary_sensor.bar_ne_corner_motion
      from: 'off'
      to: 'on'
    - id: 'bar_on'
      platform: state
      entity_id: switch.stairwell_light
      from: 'off'
      to: 'on'
    - id: 'bar_off1'
      platform: state
      entity_id: binary_sensor.bar_ne_corner_motion
      from: 'on'
      to: 'off'
      for: '00:01:30'
    - id: 'bar_off1'
      platform: state
      entity_id: binary_sensor.bar_main_motion_sensor_motion
      from: 'on'
      to: 'off'
      for: '00:01:30'
    - id: 'bar_off'
      platform: state
      entity_id: switch.stairwell_light
      from: 'on'
      to: 'off'
    - id: 'bar_off1'
      platform: state
      entity_id: binary_sensor.bar_stairwell_motion_sensor_motion
      from: 'on'
      to: 'off'
      for: '00:01:30'
    - id: 'bar_off1'
      platform: state
      entity_id: binary_sensor.shellymotionsensor_60a42395fc6a_motion
      from: 'on'
      to: 'off'
      for: '00:01:30'     
  condition: []
  action:
  - choose:
    - conditions:
        - "{{ trigger.id == 'bar_on' }}"
      sequence:
        - service: switch.turn_on
          target:
            entity_id:
            - switch.area_cans
            - switch.bar_pool_table_light
            - switch.rope_lights
            - switch.bar_hall_to_media
            - switch.bar_landing
            - switch.stairwell_light
        - service: light.turn_on
          target:
            entity_id:
            - light.bar_pendant_light
            - light.bar_back_bar_cans
          data:
            brightness_pct: 50
    - conditions:
        - "{{ trigger.id == 'bar_off' }}"
      sequence:
        - service: switch.turn_off
          target:
            entity_id:
            - switch.area_cans
            - switch.bar_pool_table_light
            - switch.rope_lights
            - switch.bar_hall_to_media
            - switch.bar_landing
            - switch.stairwell_light
        - service: light.turn_off
          target:
            entity_id:
            - light.bar_back_bar_cans
            - light.bar_pendant_light
    - conditions:
        - "{{ trigger.id == 'bar_off1' }}"
        - "{{ states('binary_sensor.bar_main_motion_sensor_motion') == 'off' }}"
        - "{{ states('binary_sensor.shellymotionsensor_60a42395fc6a_motion') == 'off' }}"
        - "{{ states('binary_sensor.bar_ne_corner_motion') == 'off' }}" 
        - "{{ states('binary_sensor.bar_stairwell_motion_sensor_motion ') == 'off' }}"
      sequence:
        - service: switch.turn_off
          target:
            entity_id:
            - switch.area_cans
            - switch.bar_pool_table_light
            - switch.rope_lights
            - switch.bar_hall_to_media
            - switch.bar_landing
            - switch.stairwell_light
        - service: light.turn_off
          target:
            entity_id:
            - light.bar_back_bar_cans
            - light.bar_pendant_light
    default: []
  mode: queued

I have an alternate setup when I want to have the bar darker. It uses two scripts and the control automations are essentially the same except for the action which calls a script.

smokey_bar_lighting:
  alias: Smokey Bar Lighting on
  sequence:
  - service: switch.turn_on
    target:
      entity_id:
      - switch.bar_pool_table_light
      - switch.bar_landing
      - switch.rope_lights
  - service: light.turn_on
    target:
      entity_id:
      - light.bar_back_bar_cans
      - light.bar_pendant_light
    data:
      brightness_pct: 60
  mode: single
smokey_bar_lighting_off:
  alias: Smokey Bar Lighting off
  sequence:
  - service: switch.turn_off
    target:
      entity_id:
      - switch.bar_pool_table_light
      - switch.bar_landing
      - switch.rope_lights
  - service: light.turn_off
    target:
      entity_id:
      - light.bar_pendant_light
      - light.bar_back_bar_cans
  mode: single

Hope this helps.

1 Like

According to the following post (dated last September), the ability to manage group associations is supported by zwave2mqtt (but not by Z-Wave JS).

If you want to make your lights to respond simultaneously, your options are:

  1. Use zwave2mqtt to create a group association.
  2. Wait for Z-Wave JS to acquire the needed feature (if ever).
1 Like

Thank you!

Exactly as posted by others. You cannot do it with a Home Assistant group, such functionality has to be in the Hub or controller normally. For Insteon, you can use Home Assistant to build a scene in the Hub and then execute that scene which will send simultaneous commands to many lights. I have one in my install called “Panic” for my wife that turns on about 16 lights all at once among other things.

The issue you normally hit right after you implement this strategy is that these things typically do not have a “state”. In other words, you cannot have some button that shows that all devices in the “scene” are “on”. In the Insteon install, I made a modification such that you can create a Home Assistant group that has all the devices in your Insteon scene. You can use that to show the state of the scene, but the on/off are through insteon.scene_on and insteon.scene_off services.

As a follow-up:
I have migrated to zwavejs2mqtt and am now trying to get associations/groups working for my basement lights.

The problem is that when I group one light with others, they ALWAYS turn on/off together. I want to be able to control the lights individually using the physical switches and virtual switches (in Home Assistant) and also have the ability to control them as a Group using an automation/script.

Follow-up to my follow-up:
I found a way!

service: zwave_js.multicast_set_value
data:
  value: 'off'
  property: targetValue
  command_class: '37'
target:
  entity_id:
    - switch.basement_common
    - switch.basement_bedroom
    - switch.basement_hall
    - switch.basement_stairs

It appears you chose option 1.

Yes, although it turns out that it was not necessary.

Then I suggest you don’t mention installing it in your Solution post because it may lead others to believe it’s a prerequisite for the zwave_js.multicast_set_value service call.