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

[knx] Allow color temperatures specified in mired #18004

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

holgerfriedrich
Copy link
Member

This allows other bindings or scripts to send commands which specify the color temperature in mired.

This allows other bindings or scripts to send commands
which specify the color temperature in mired.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
// unit for 7.600 is K; special handling for color temperature: make sure °C and mired work as well
assertEquals("3273.15", ValueEncoder.encode(new QuantityType<>("3000 °C"), "7.600"));
assertEquals("4000", ValueEncoder.encode(new QuantityType<>("250 mired"), "7.600"));
assertEquals("4000", ValueEncoder.encode(new QuantityType<>("250 mirek"), "7.600"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Not strictly necessary to test it (the aliases are anyway tested in core) .. but for completeness MK⁻¹ is another possible alias.

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM

@J-N-K J-N-K merged commit 6978b99 into openhab:main Jan 1, 2025
3 checks passed
@J-N-K J-N-K added this to the 5.0 milestone Jan 1, 2025
@holgerfriedrich holgerfriedrich deleted the pr-knx-mired branch January 1, 2025 12:03
DrRSatzteil pushed a commit to DrRSatzteil/openhab-addons that referenced this pull request Jan 3, 2025
This allows other bindings or scripts to send commands
which specify the color temperature in mired.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-4-3-milestone-discussion/158139/131

chilobo pushed a commit to chilobo/openhab-addons that referenced this pull request Feb 10, 2025
This allows other bindings or scripts to send commands
which specify the color temperature in mired.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants