Question about turning on/off/locking/unlocking many devices at once in an automation

If I have a group of 25 lights and I send an light.turn_off to that group, does HA have to check each light to see if they are on/off? Does it just send the off command to all lights regardless, or does it do a scan to determine what is one/off and then just send the off command to those that are on?

I’m asking because I feel like my goodnight routine is causing a slowdown on my zwave network when it runs. My routine should be turning off most lights, locking several doors, closing the garage if its open, etc. My lights and switches are 60% zwave and 40% hue lights. They all turn off fine, but once it runs, for the next 30-60 seconds my zwave network becomes sluggish. For example I have a light in my bedroom closet that turns on/off based on motion, and it usually fails to work if I happen to walk into the closet while the goodnight routine is running.

I was thinking that it seems like my zwave network is being flooded with off commands?

It doesn’t check to see if they are on. Just a mass ‘turn off’. For what it’s worth, I do the same thing and don’t have those issues with 30 lights. But they all aren’t dimmers.

Good to know. I do have a lot of dimmers. I’d say 80% are dimmers. hmmm, would it make sense to do some sort of loop and only send the off command to lights that are on?

You could, but it could be slower to turn them off. You could always create a scene too. I believe a scene would just be 1 blast, not sure though. I don’t use scenes so I don’t know how they are managed in the software (or zwave).

Do you know how HA works when it comes to domains and turning on/off. Let’s say I have a group with multiple lights. Some zwave, some hue, and some zigbee. If I send a light.turn_off to that group, does it just go down the list sending commands. Would it be more or less efficient if the list was ordered by device type, like all zwave 1st, then hue, then zigbee, etc.

I have recently cleaned up a lot since lovelace, and I feel like the zwave slowdown with my goodnight routine is new. It’s possible it’s not new, and I just never noticed before, but not sure. The only real change I can think of is the reorginization of my groups and consolidated a lot.

Sorry, I can’t answer that. I would assume that it wouldn’t matter based on how HA works with async. Even if they were grouped, HA would need some method to bundle them as calls and I don’t know if that exists.

No worries. I’m going to do some testing. I reordered my group so that it’s zwave, then hue, then zigbee. I’ll see if it makes any difference. My issue is only for about 15-30 seconds or so after the routine runs where my other zwave devices are less responsive. Funny thing is the lights turn off almost immediately and all at once. Maybe it’s the dimmers with the intensity and refresh interval causing the zwave delays.

Yeah, I’m not sure. I’ll have to test some things myself. I don’t have motion sensors. When I turn off all the lights, they stay off. Once and a great while, the network will lag in the morning. But that’s rare.

1 Like