Skip to content
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

#1553 - Fixed new rounding function for local_calibration #1555

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

folfy
Copy link
Collaborator

@folfy folfy commented Jan 8, 2025

Seems "local_calibration_steps" is bad naming in our code, and actually refering to the step (size), not the number of steps. Therefore the new round_by_steps is "wrong" in local calibration mode, as the opposite was assumed. Issue wasn't apparent in my test, since I didn't have a TRV with local calibration yet.

Motivation:

Fix bug - right now we round by the inverse of step size - e.g. 0.1° step = 10°C steps 😅

Changes:

Renamed "steps" to "step" (target_temp_step also was already a step and not steps, even though apparently they're both supposed to be the same thing) and corrected new rounding code, and made sure the function documentation is clear now.

Related issue (check one):

Checklist (check one):

  • I did not change any code (e.g. documentation changes)
  • The code change is tested and works locally.

Test-Hardware list (for code changes)

HA Version: 2024.12
Zigbee2MQTT Version: N/A (ZHA)
TRV Hardware: Bosch RBSH-TRV0-ZB-EU (Radiator Thermostat II)

@folfy
Copy link
Collaborator Author

folfy commented Jan 8, 2025

Fix tested with local calibration mode & Bosch TRV through ZHA on my productive HA instance

@KartoffelToby KartoffelToby merged commit 6385a79 into KartoffelToby:master Jan 9, 2025
2 of 3 checks passed
@folfy folfy deleted the rounding branch January 10, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offset calibration broken in v1.7.0-b2
2 participants