Skip to content

Conversation

@luukdobber
Copy link
Contributor

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_control and heating_circuits calls 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_default option 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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Aug 8, 2025

Hey there @erwindouna, mind taking a look at this pull request as it has been labeled with an integration (tado) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tado can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign tado Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@luukdobber luukdobber marked this pull request as ready for review August 12, 2025 11:42
Copilot AI review requested due to automatic review settings August 12, 2025 11:42
Copy link
Contributor

Copilot AI left a 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.

@luukdobber luukdobber force-pushed the feature/tado-heating-circuit branch from 5e411d5 to 4033fb1 Compare August 29, 2025 10:15
@luukdobber
Copy link
Contributor Author

@joostlek could you take a look at this PR?

@joostlek
Copy link
Member

joostlek commented Sep 1, 2025

#151223 FYI

@luukdobber luukdobber force-pushed the feature/tado-heating-circuit branch from 4033fb1 to 7907752 Compare September 26, 2025 20:18
@emontnemery
Copy link
Contributor

emontnemery commented Oct 27, 2025

@luukdobber @joostlek what's this PR waiting for? I'm not sure what do make of the link to #151223

@erwindouna
Copy link
Contributor

@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.
I am working on a refactor PR (#151933 (comment)) to change the library to an async one. Once this is in place, I will eliminated some waste (double calls, merge the ZoneState in the ZoneStates endpoint). Maybe after this is done and we cleared a few API calls, we bring in room for the circuit calls.

@emontnemery
Copy link
Contributor

@erwindouna OK. Should we mark this PR as draft until your refactoring PR is completed?

@erwindouna
Copy link
Contributor

I would recommend it, yes.

@luukdobber luukdobber marked this pull request as draft October 30, 2025 11:53
# Conflicts:
#	homeassistant/components/tado/__init__.py
#	homeassistant/components/tado/entity.py
#	homeassistant/components/tado/strings.json
#	tests/components/tado/util.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants