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): Fix Mirek -> Kelvin conversion constant. #1934

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Feb 13, 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

This constant should be 100, but I resolved a conflict during a rebase incorrectly when prepping the original PR and it got set to 11 instead of 100.

Summary of Completed Tests

  • Tested on real devices
  • New Busted tests added to verify behavior at the min/max boundaries.

Copy link

github-actions bot commented Feb 13, 2025

Channel deleted.

Copy link

github-actions bot commented Feb 13, 2025

Test Results

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

Results for commit 153c9d6. ± Comparison against base commit 9d3589f.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 13, 2025

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 153c9d6

@dljsjr dljsjr force-pushed the fix/hue-incorrect-kelvin-step-size branch from 1368feb to cf090e5 Compare February 13, 2025 20:59
@dljsjr dljsjr requested a review from greens February 13, 2025 20:59
dljsjr added 2 commits March 3, 2025 16:49
This constant should be 100, but I resolved a conflict during a rebase incorrectly
when prepping the original PR and it got set to 11 instead of 100.
If the bulb's color temperature changes because of an ST-initiated user
requested setpoint, we emit that directly instead of clamping to the
step size. This is to remain consistent with the way things are done on
the rest of the platform with other integrations.
@dljsjr dljsjr force-pushed the fix/hue-incorrect-kelvin-step-size branch from cf090e5 to 59b1da3 Compare March 3, 2025 22:49
The existing logic utilized the device persistent fields to determine
if a range update was needed, as to avoid un-necessary attribute emits.

This would lead to existing devices not ever emitting the min/max color
temp range values if the saved min/max matched what was reported by the
API.

This is adjusted to use the cached latest state for the device instead,
so that we can detect the `nil` if the device has never emitted a value
for its range.
@dljsjr dljsjr merged commit 57a02a2 into main Mar 5, 2025
11 checks passed
@dljsjr dljsjr deleted the fix/hue-incorrect-kelvin-step-size branch March 5, 2025 17:53
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.

5 participants