-
-
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] Adjust default ranges for some characteristics #17157
[homekit] Adjust default ranges for some characteristics #17157
Conversation
f75cfb8
to
c4468c6
Compare
* Illuminance can obviously get down to 0, instead of 0.0001lx (especially if your sensor only reports integer values) * Raise Illuminance ceiling slightly (from 100k lx) * Adjust default range of Color Temperature to the warmest and coolest bulbs I could find on Amazon (for settable characteristics, you don't want to have too large of a range because HomeKit will often use those ranges to determine the scale of the slider). Original is 50-400 mired/2500-20000 K * Lower min value of current temperature from 0°C to -100°C (going below freezing is not unusual. lowest recorded temperature on earth is -89.2°C. I just chose a nice round number) Signed-off-by: Cody Cutrer <cody@cutrer.us>
c4468c6
to
df226b1
Compare
Best would be that these values are changed in HAP. Would be nice for @yfre to comment anyway, he’s away for some weeks, so let’s wait a bit before merge this Code wise I would prefer to have these values in a constant for clarity and maintainability. Otherwise LGTM |
The values in HAP-Java match what's in the HAP specification, and should not change (really, we should be able to omit them in the JSON if it matches the default). |
#15268 Makes me wonder. If 0.0 snaps to the min value. How would that work with persistence at startup as that could somehow lead to undesired results?! |
Gentle ping @yfre |
@lsiepel thanks for the reminder. nevertheless, i agree with Cody - Java-HAP should be a reference implementation for the HAP protocol and default values should be according to Apple HAP specification, even if they are not good. i support this PR and the approach of redefining default values in OH. but i would also prefer them be defined as constant a not as numbers directly inline. |
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.
please make default values to constants.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
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.
Thanks, LGTM
* [homekit] adjust default ranges for some characteristics Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] adjust default ranges for some characteristics Signed-off-by: Cody Cutrer <cody@cutrer.us> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
* [homekit] adjust default ranges for some characteristics Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] adjust default ranges for some characteristics Signed-off-by: Cody Cutrer <cody@cutrer.us>
Fixes #15818