-
-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Add Tado heating circuit select with own coordinator for reduced number of API-calls #150268
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
base: dev
Are you sure you want to change the base?
Add Tado heating circuit select with own coordinator for reduced number of API-calls #150268
Conversation
|
Hey there @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
5e411d5 to
4033fb1
Compare
|
@joostlek could you take a look at this PR? |
|
#151223 FYI |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
4033fb1 to
7907752
Compare
|
@luukdobber @joostlek what's this PR waiting for? I'm not sure what do make of the link to #151223 |
Hi @emontnemery, Tado has a generic policy change of reducing the API calls. This PR would increase the API calls. Currently the users are getting limited by 20k calls per day. If this gets added, they will reach that threshold faster; at least that's why I am guessing Joost is referring to that PR. |
|
@erwindouna OK. Should we mark this PR as draft until your refactoring PR is completed? |
|
I would recommend it, yes. |
# Conflicts: # homeassistant/components/tado/__init__.py # homeassistant/components/tado/entity.py # homeassistant/components/tado/strings.json # tests/components/tado/util.py
Proposed change
This PR brings back the heating circuit select entity for Tado zones (originally added in #147902 and later reverted in #149670 due to API usage concerns). It lets users choose which boiler circuit a zone uses — or No heating circuit — for more flexible heating automations.
What’s new this time
To address the API load concerns, I’ve moved the
zone_controlandheating_circuitscalls into a separate coordinator with a 1-hour scan interval. These settings rarely change, so 1/hour for heating circuits and 1/hour per zone for zone control should be fine (and could even be lower). This keeps the extra API calls minimal while still keeping the feature useful.Another possible optimisation: using the
entity_registry_enabled_defaultoption so the selects are disabled by default. The coordinator could then update only for selects users have explicitly enabled. This would cut API calls even further. With my still-limited (but growing 😉) knowledge of the HA codebase, this one’s a bit trickier for me to implement, but I wanted to mention it for discussion.Note
I completely understand the reason for the revert — API efficiency matters. I had assumed the issue was resolved because #145623 from the Tado engineer was closed and I didn’t see other open API load issues. A mention in the revert PR would still have been nice, so I didn’t have to find out after the new release myself 😊.
Tagging @joostlek so you’re aware and can take a look at this updated approach.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: