Is it possible to parallelize the switch of lights?

I have a setup where several lamps (about 10) are all integrated in different ways (RF433 via a bridge to MQTT, some cloud bases such as Meross, Zigbee, …). They are configured as a group so I toggle them with one command.

The effect is that they do not switch on at the same time, there are small lags in the reaction. I can live with that.

I have however the feeling that the switch is sequential: once one light has confirmed the switch, the next one is triggered. Is this is the case?

If not - is there a way to force threads for each light switch? That would at least switch on the “faster” lights without waiting for the “slower” ones.

Is this a group or a light_group?

@nickrout The group is defined as

group:
  michael:
    name: michael
    entities:
      - switch.michael_bureau_gauche
      - switch.michael_bureau_droite
      - switch.michael_lampe_haute
      - switch.michael_lampe_mur

Try it as a light_group

I think the issue is the multiple protocols. I have a light group in a room in my house that consists of Lutron Caseta and Zwave switches (yes they are recognized as lights in HA). The Lutron are listed last in the group because I recently added them to the system, however, they are the first lights to turn on because the Zwave is slower.

Yes, I am aware that the different protocols will lag in a different way. What I wanted to avoid is to have one blocking the others (a solution would be to trigger each switch in its own thread - which may be the implementation, I do not know).

Your experience is actually good news for me - the last entries do not seem to be affected by the (slower) previous ones

so how did the light_group thing go?

Sorry @nickrout, I had to find a moment to test in production :slight_smile:

Unfortunately, this won’t work because the entities are of type switch:

2020-11-09 09:00:21 ERROR (MainThread) [homeassistant.config] Invalid config for [light.group]: Entity ID 'switch.salon_chandelier' does not belong to domain 'light' for dictionary value @ data['entities']. Got ['switch.salon_chandelier', (.... more entities ...)]. (See /config/configuration.yaml, line 312). Please check the docs at https://www.home-assistant.io/integrations/group

You could define them as light switches and then add them to a light group.

Alternatively you could define a template light and switch on / off all switches by service call.

I had that in the past but moved to using switches (for various reasons). Is a light_group handled differently than a group when it comes to the way the elements are executed (namely the threading)?