#Do we want an entity for the remaining
1 messages ยท Page 1 of 1 (latest)
Now that you ask the question like this... In my recently merged Tado rate limit, I got the explicit request to do that only on exceptions and in the diagnostics
Yep, I don't exactly recall the reasoning
Not relevant for each update cycle
and in your case, was it a counter or from the headers?
Headers
because here it seems more like a device property rather than a side effect so to say
Debatable, depending on your need for data I suppose
True
yea, hence I threw it in here as I wasn't completely sure
I'd say it's fine. Interesting what others think ๐
How would the user be able to use that information? They would need to know how action calls relate to write requests. Without that information I don't think we should add it.
And I don't think we want users to have to care about that either.
Would exposing the limit in the diagnostics be an option?
I believe it already is now
At this point I am wondering how they present that in their app or to their users
My main reason for adding it was visibility when troubleshooting automations that stop changing the mode after the daily limit is reached. It gives a 429 error (noted in documentation under troubleshooting).Since it is already a disabled-by-default diagnostic sensor, and also available through diagnostics, I saw that as a reasonable middle ground.
It can also provide useful graph/history insights, for example to spot unexpected spikes in write usage caused by an automation
The app they (duco) provide is primarily intended for installers of the product. The Connectivity Board seems to be mainly aimed at users who want to integrate the system into their home automation setup.
In that case I think we should handle 429 well
Currently a 429 is treated as a generic DucoError, the coordinator raises UpdateFailed and entities go unavailable until the next poll. Improving this in the library and integration is planned for a follow-up PR.
I'm thinking about proper DucoRateLimitError handling, ServiceValidationError on write actions, and a warning log
Better to focus on getting that done then ๐