Raise exception in case of API rate limit reached#13
Conversation
|
@N3rdix, I implemented your PR into my HA by adding a folder named hydrawiser in the config director (/config/hydrawiser) I copied the 2 files you changed plus added the init.py file into that directory and restarted. I can report that the integration loaded successfully even though I did see a "429 Client Error: Too Many Requests for url:" Full logs show the following (not shown as warnings or error just info): File "/config/hydrawiser/core.py", line 53, in update_controller_info I received warnings about sensors and switches taking over 10 seconds to load however everything did load. |
Might not be perfect from coding perspective (python beginner), but at least the consuming side can react on the error.
Also adjusted the API endpoint, according to the Hydrawise API docs it's https://api.* and not https://app.* although both are working (still).