-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
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>
...org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/dpt/ValueEncoder.java
Show resolved
Hide resolved
// 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")); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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>
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 |
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>
This allows other bindings or scripts to send commands which specify the color temperature in mired.