-
-
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
[homekit] increase flexibility of ColorTemperature #13538
Conversation
allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us>
fixes #12517 |
@yfre : this is ready for review now; the openhab-core dependencies have been merged. |
final int finalMinValue = minValue; | ||
final int range = maxValue - minValue; | ||
|
||
// final int defaultValue = minValue; |
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.
this commented out line can be probably removed
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.
thank you @ccutrer
homekit specific and logic looks good to me. good examples in the docu.
i have no experience with openHAB QuantityType, but the unit conversions looks correct.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
An invertible unit is simply a conversion that allows changing dimensions. This is required because mired is 1/K (plus a multiplication), and that's technically a different dimension (of 1/temperature, not temperature). It's a new concept introduced into core for this. I need to do a PR for the MQTT binding that uses it to allow implicit conversion between K<->Mired with that binding as well. |
.../src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java
Show resolved
Hide resolved
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
* [homekit] increase flexibility of ColorTemperature allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] increase flexibility of ColorTemperature allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
* [homekit] increase flexibility of ColorTemperature allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] increase flexibility of ColorTemperature allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] increase flexibility of ColorTemperature allow Number or Dimmer items, and mired or Kelvin units. Signed-off-by: Cody Cutrer <cody@cutrer.us>
allow Number or Dimmer items, and mired or Kelvin units.
Dependent on openhab/openhab-core#3108 and hap-java/HAP-Java#167