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.
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).
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.
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.
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.
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.
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.