Skip to content

Conversation

@JP-Ellis
Copy link
Contributor

@JP-Ellis JP-Ellis commented Nov 5, 2025

Proposed change

What

Enable the TARGET_TEMPERATURE feature of the iZone controller if any of the zone's temp_curent is None.

Why

If an iZone zone does not have a thermometer, then iZone will not adjust the target temperature of the controller. In such cases, Home Assistant needs to be able to set the target temperature based on non-iZone thermometers.

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

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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:

Copilot AI review requested due to automatic review settings November 5, 2025 04:08
@JP-Ellis JP-Ellis requested a review from Swamp-Ig as a code owner November 5, 2025 04:08
@home-assistant
Copy link

home-assistant bot commented Nov 5, 2025

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

Code owner commands

Code owners of izone 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 izone 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.

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.

Pull Request Overview

This PR fixes a bug in the iZone climate integration where the controller's TARGET_TEMPERATURE feature was not being enabled when zones lacked temperature sensors. The fix allows Home Assistant to set the target temperature for zones without thermometers, enabling control based on external temperature sensors.

Key Changes:

  • Added logic to enable TARGET_TEMPERATURE feature when any zone has temp_current set to None
  • Improved code documentation explaining the three scenarios where temperature control should be enabled
  • Added comprehensive test coverage for all temperature control scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
homeassistant/components/izone/climate.py Added condition to check for zones without temperature sensors and enable TARGET_TEMPERATURE feature accordingly; improved inline documentation
tests/components/izone/test_climate.py Added comprehensive test suite covering all scenarios for TARGET_TEMPERATURE feature enablement

If an iZone zone does not have a thermometer, then iZone will not adjust
the target temperature of the controller. In such cases, Home Assistant
needs to be able to set the target temperature based on non-iZone
thermometers.

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis force-pushed the fix/izone-without-izone-thermometre branch from 1e3677a to c3bf17c Compare November 5, 2025 04:14
@edenhaus edenhaus changed the title fix(izone): allow control on missing thermometer Allow control on missing izone thermometer Nov 5, 2025
controller.ras_mode == "master"
and controller.zone_ctrl > controller.zones_total
)
or any(zone.temp_current is None for zone in controller.zones)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I set the target temp on a controller where one zone has no temp sensor and the others have one? Will the behavior be the same for the zones with a temp sensor as when I would have a controller where all zones have a temp sensor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test it, as that is not my setup at home.

All I can say is that if a zone does not have a thermometer, then iZone will never update the controller's target temperature, and it must be updated manually through other means (Home Assistant, their app, etc.).

I suspect that in the scenario you propose, iZone may override the target temperature, which Home Assistant would see (and automations could take into account accordingly).

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.

[iZone] Unable to set target temperature when zone doesn't have a thermometer

3 participants