I’m trying to develop a custom HA integration for a device.
The device exposes a REST API on which I send requests to retrieve and define states. However, this device does not support concurrent HTTP requests: It returns an error in this case. (it’s a shitty device …)
I use the
async_add_job method with as parameter, the function that will make the request (push or fetch state) to the device. However, these requests are executed in parallel and when there are several requests, my integration receives errors.
Would there be in HA a way for all these requests to be put in a queue, which executes them one by one in order to avoid errors?
Thank you in advance for your help !