Skip to content

Tado fix water heater#113464

Merged
edenhaus merged 3 commits into
home-assistant:devfrom
erwindouna:tado-fix-waterheater
Mar 20, 2024
Merged

Tado fix water heater#113464
edenhaus merged 3 commits into
home-assistant:devfrom
erwindouna:tado-fix-waterheater

Conversation

@erwindouna
Copy link
Copy Markdown
Member

@erwindouna erwindouna commented Mar 14, 2024

Breaking change

Proposed change

Reverts the water heater typing (introduced in #107678), whereas this caused issues in running installations. A PR to properly type it will follow.

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @chiefdragon, 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.

Copy link
Copy Markdown
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

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

Why do we remove all the typing? What's the actual change?

Comment on lines +129 to +134
tado,
zone_name,
zone_id,
supports_temperature_control,
min_temp,
max_temp,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we untype this?

self._max_temperature = max_temp

self._target_temp: float | None = None
self._target_temp = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same

self._current_tado_hvac_mode = CONST_MODE_SMART_SCHEDULE
self._overlay_mode = CONST_MODE_SMART_SCHEDULE
self._tado_zone_data: PyTado.TadoZone = {}
self._tado_zone_data = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Idem

@home-assistant home-assistant Bot marked this pull request as draft March 14, 2024 22:03
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@erwindouna
Copy link
Copy Markdown
Member Author

Why do we remove all the typing? What's the actual change?

A fix that reverse a running issue users experience due to the added typing. The min and max temperature contain bad defaults.
I need more time with a friendly user to optimize this. For now a reversal is preferred to not interfere running installations.

@iskzz
Copy link
Copy Markdown

iskzz commented Mar 15, 2024

Thanks for looking at this erwindouna. I can help test also if needed.
I have the same issue. Tado integration since 2023.3.0 no longer allows setting hot water mode to Heat, only allows Auto or Off.
I'm running HA OS, all updated to latest versions.

@EPicLURcher
Copy link
Copy Markdown

was this included in 2024.3.1? I installed the update, but am still experiencing this issue

@erwindouna
Copy link
Copy Markdown
Member Author

was this included in 2024.3.1? I installed the update, but am still experiencing this issue

This is a new fix to address the issue.

@joostlek joostlek added this to the 2024.3.2 milestone Mar 18, 2024
@erwindouna erwindouna marked this pull request as ready for review March 18, 2024 08:48
@home-assistant home-assistant Bot requested a review from joostlek March 18, 2024 08:48
@edenhaus
Copy link
Copy Markdown
Member

edenhaus commented Mar 19, 2024

The typing is only checked by the static analyzer and has no impact on runtime. Therefore only the three functional changes introduced in #107678 can cause the issue.
I suggest reverting only them.

If you are fine I would apply the following patch on this PR, which adds the typing back and only reverts the functional changes and the typing on those three variables/arguments
tado.txt

To apply the patch run git apply < tado.txt on a terminal where this PR code is checked out

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Mar 19, 2024
@joostlek joostlek requested a review from edenhaus March 19, 2024 12:19
@edenhaus edenhaus merged commit 42873ca into home-assistant:dev Mar 20, 2024
@erwindouna erwindouna deleted the tado-fix-waterheater branch March 20, 2024 11:24
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cherry-picked cla-signed integration: tado Quality Scale: No score small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants