Turn multiple devices (valves) off at the same time


#1

I have 4 wave WaterCop valves in my home and they work great. I do have 1 issue that is annoying me and was wondering if anyone knew a fix for.

When I turn on/off the devices they shut off 1 at a time, and these valves takes about 2-3 seconds to shut on/off. So having 4 the last one won’t shut off until after like 10 seconds. Is there a way to call a command so ALL of them starts shutting on/off at the same time rather then in a specific order.

:pensive:


#2

have you tried calling the valves in a list?

Off the cuff example:

service: homeassistant.turn_off
entities:
  - binary_switch.valve_1
  - binary_switch.valve_2
  - binary_switch.valve_3
  - binary_switch.valve_4

#3

This is what I’ve tried so far:

  1. a script:

rg_all_off:
alias: Turn Off ALL Valves
sequence:
# Turn off all valves
- service: switch.turn_off
data:
entity_id: switch.b1
- service: switch.turn_off
data:
entity_id: switch.b2
- service: switch.turn_off
data:
entity_id: switch.b3
- service: switch.turn_off
data:
entity_id: switch.b4
- service: switch.turn_off

  1. putting them in a group and turning that group off

zone_b:
view: true
entities:
- switch.b1
- switch.b2
- switch.b3
- switch.b4


#4

So do this:

rg_all_off:
alias: Turn Off ALL Valves
sequence:
# Turn off all valves
- service: switch.turn_off
  entities:
    - switch.b1
    - switch.b2
    - switch.b3
    - switch.b4

#5

Getting this error:
Invalid config for [script]: [entities] is an invalid option for [script]. Check: script->script->rg_all_on->sequence->0->entities


#6

I removed the error by changing “entities” to “entity_id” but the script works the same, turning off 1 at a time, where they wait for one and other to complete.


#7

Odd I can fire off multiple TTS events in sync this way, maybe switch.turn_off isn’t async’ed.
You might need to file a bug report on github regarding it.

EDIT: Try this service instead:

service: homeassistant.turn_off


#8

I know this may sound odd, but make them into a scene and turn the scene off:

From what I’ve heard, this is the ‘fastest way’ for lights to react. I would assume it has the same affect for any devices.


#9

What is the protocol of your switches? I have the similar occurrence with my irrigation control based on Sonoff 4CH Pro switches. Since normal usage is sequentially, I don’t mind or even notice the async actions. But when we winterize the system, I open the valves four at a time. Again I don’t see this as a problem that the valves don’t open at the same time, and they don’t close at the same time. But I am interested in cleaning up my code a bit.


#10

I feel like this is some sort of Z-wave limitation. Maybe the Z-wave USB stick can only send 1 command at a time and with these valves it won’t fire the next event until the first one is finished.


#11

The commands should complete sending within milliseconds.


#12

So strange. It’s definitely synced with the device completing cause as soon as one stops the other one starts.


#13

Maybe this will spark some ideas of what could be wrong. Seems like the hub is waiting for the completion report before continuing.

Binary Switch Command Class, Version 1
The Binary Switch Command Class is fully implemented. The Binary Switch Set Command causes the ball valve to close with value = 0xFF and causes the ball valve to open with value = 0x00. A Binary Switch Report will be sent upon completion of the open or close operation. The Water Valve will respond to a Binary Switch Get with a Binary Switch Report indicating the last known position of the ball valve (value = 0xFF indicates closed and 0x00 indicates open).