-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Api calls failed (getting rate limited?) - use stored values where possible #72
Comments
Currently in testing:
Need to force all_rates to update from the previous 30 min slot if the entity doesn’t already exist to avoid unknown values in the sensors on first startup. |
|
Hi, I installed the 0.1.1-beta.1code @ 22:43:44 and so far the following has been logged: 2021-04-30 22:43:44 WARNING (MainThread) [homeassistant.loader] You are using a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Overall summary Queries Suggestions |
The json errors have not entirely disapeared 2021-05-01 21:00:00 ERROR (SyncWorker_3) [custom_components.octopusagile] Expecting value: line 1 column 1 (char 0)` |
Glad it worked as expected, good spot on the timer updates @ 2000, I hadn’t noticed that before, they retry every 30mins until they manage to update, it looks like mine succeeded at 2030 tonight. Thanks for helping fault find and test this, it’s appreciated! |
It's not a problem particularly , just a curiosity, but I've noticed that although the timers next update may be scheduled for 1900Z it is actualy running at 1900BST.Which I think that is actually the best time for it , but maybe it would be worth advertising the time as 1900 only then that would cover both UTC and BST. Just a thought. |
Api calls have recently started failing every now and then, it looks like they’re maybe getting rate limited. There are a lot of places where an api call is made where it doesn’t need to be, where possible data should be taken from stored values, most likely the rates entity in most cases.
Where it’s not a quick fix, for example run_devices the error should be caught so as not to cause further code not to be ignored (timers are executed after run_devices update so are not triggering.)
The text was updated successfully, but these errors were encountered: