-
-
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
[hue] Reintroduce LK Wiser dimmer work-around for API v2 #15316
Conversation
@jlaur you would simply set a boolean flag in the |
Yes, that was the old implementation. I just want to keep the code clean, and if there would be 10 booleans over time, it would start to get messy. But you are right, let's not over-engineer, we can always adapt if this would become a problem. |
I suppose you could have a List of references to different product specific patch methods that apply model specific overrides for different device models, and then call List.forEach(call respective patch method). But honestly I think that would be even more messy. |
dcd53d3
to
07c156e
Compare
@jlaur apropos the Osram patch: The original discussion link http://www.everyhue.com/vanilla/discussion/1756/solved-lightify-turning-off (*) has disappeared. And from googling and ebay I am pretty sure that the old Osram GU10 lamp that had this bug, is not longer available to buy. So probably the issue would only apply to older migrated bulbs. (*) and also the new forum link https://developers.meethue.com/ seems currently to be returning a "502 Bad Gateway" error.. |
Thanks, I also found that link no longer works. Since I don't have the details about the specifics here, I think I will scope the PR to only fix the LK Wiser issue. If anyone with an old bulb would experience issues, we could reimplement it then, and would have a chance to test it. There might be differences in the approach. I just re-verified that any transition time works with the LK Wiser Dimmer. I don't know if Osram needed a transition time of zero. |
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.
Apart from the above comment LGTM
...ab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/Clip2ThingHandler.java
Show resolved
Hide resolved
Fixes openhab#15315 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
07c156e
to
5b5b6ed
Compare
So probably the work around should check if there is already a transition time set in the DTO, and only if it is not set, then the patch should set a value of zero. This would eventually allow users to apply slow transitions. EDIT: OK I see that you did already do the above in the latest commit. |
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
@cweitkamp / @jlaur I suggest to hold merging this PR until #15323 discussion is resolved. |
I consider this a regression in 4.0 and would prefer to have it merged and cherry-picked into 4.0.x to be included in 4.0.2. Depending on the outcome of #15323 it will either be refactored (most likely) or removed, but I don't see this as an obstacle. This is probably to be considered an enhancement and thus would be destined for 4.1. |
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, thank you
@lolodomo - would you agree to cherry-pick this into the 4.0.x branch? This work-around already existed for API v1, so it's a regression. |
Ok, fine. |
Fixes #15315 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#15315 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Fixes #15315