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

fix(hue): Make rounding logic platform consistent #1979

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Mar 5, 2025

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

There was a slight bug with the previous port of the rounding logic from Matter/Zigbee over to Hue because I was reading two different places in the code and getting them confused in my head.

This change does the following:

  1. Only use the 100 step size constraint when computing the min/max values instead of everywhere. This is in line with how this is handled elsewhere on the platform.
  2. Use normal rounding everywhere else.

Summary of Completed Tests

  • Busted tests still pass
  • ThinkTank will be QA'ing after merge to Alpha

There was a slight bug with the previous port of the rounding logic
from Matter/Zigbee over to Hue because I was reading two different
places in the code and getting them confused in my head.

This change does the following:

1. Only use the 100 step size constraint when computing the min/max
values instead of everywhere. This is in line with how this is handled
elsewhere on the platform.
2. Use normal rounding everywhere else.
Copy link

github-actions bot commented Mar 5, 2025

Channel deleted.

Copy link

github-actions bot commented Mar 5, 2025

Test Results

   64 files    414 suites   0s ⏱️
2 091 tests 2 091 ✅ 0 💤 0 ❌
3 583 runs  3 583 ✅ 0 💤 0 ❌

Results for commit b263b9f.

Copy link

github-actions bot commented Mar 5, 2025

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against b263b9f

@dljsjr dljsjr merged commit d7846ad into main Mar 5, 2025
11 checks passed
@dljsjr dljsjr deleted the fix/hue-incorrect-kelvin-rounding branch March 5, 2025 20:23
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.

2 participants