Taking advantage of Wink's group resource

I have noticed when changing the brightness on a light group consisting of wink lights, that it looks like a set state call is called for each device individually. This makes for an unattractive transition in my opinion.

I noticed that Wink has a group resource in its API to change multiple entities simultaneously. Is this call not used in HA? If not, is there a reason past it just hasn’t been done yet?

If you create a group in Wink that group will show up in Home Assistant as an individual light or switch. You can then use that light/switch to make changes to the entire group with 1 API call.

Ah, interesting, I wasn’t aware.

I’m interested in potentially turning this into a project I can work on. I haven’t done much development work and I’ve been looking for something to do.

Are you saying you want to implement the group commands that Wink has in to HA? If that is the case, I don’t believe Wink supports that. I think the only way to control group of lights or switches is how I described above. A wink group must be created first. I just skimmed through the Wink API doc again and didn’t see a way to send multiple lights but I could have missed it.

Now maybe it would be possible on the HA side to detect when a group was created inside of HA and make a Wink group with those devices and forward the calls to the Wink group when the HA group is modified? That may be possible but probably difficult.

The Wink API says,

The group resource is a representation of a group of wink devices which may be controlled simultaneously.

So when a light group’s brightness is being set, I was thinking of having the logic iterate through the list and collect all Wink lights, then make one group call.

Correct, but I believe that requires an existing Wink group in order to perform the group call. You reference the preexisting Wink group when speaking to the Wink API and it handles issuing those commands out to the devices that are part of the group.