[API] Can multiple light stage changes be clustered together

This is a broader question with regards to the API. But in my specific case, I’d be using this concept with NetDaemon. NetDaemon is essentially like AppDaemon, but it uses C#.NET instead of Python.

I’m writing a wrapper/framework on top of NetDaemon that would manage things like scenes, animations, and automations. Here’s the code so far for those interested:

The issue I would like to resolve is that when setting or animating a scene, I would like to potentially reduce API calls. I already have it only send changed states to the lights, but it still makes a call per light.

Ideally, I would be able to package all the light state changes together and send all the changes as a single API call. By clustering them together, it could make the changes somewhat more responsive and synchronized, since it wouldn’t need to wait for acknowledgement from each individual call before moving to the next. Is this something that can be done in the API?

(As of typing this, I’m looking at the ability to generate scenes on-the-fly. I might be able to cluster changes together in a scene, and pass the scene in a single API call.)

As a bonus question, how does HomeAssistant handle Philips Hue calls? I believe the API allows clustering like this, but I’m not sure if HomeAssistant’s integration does this. If it doesn’t, that’s an opportunity for a huge lighting improvement.