-
-
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
[nikohomecontrol] Fix dimmer control sequence #11737
Conversation
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
...rg/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java
Outdated
Show resolved
Hide resolved
...rg/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java
Outdated
Show resolved
Hide resolved
@@ -627,6 +631,9 @@ public void executeAction(String actionId, String value) { | |||
} else if (NHCOFF.equals(value)) { | |||
property.status = value; | |||
} else { | |||
action.setState(Integer.parseInt(value)); // set cached state to new brightness value to avoid |
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.
No need to catch exception?
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.
It would be a bug if the value is not an int here, but I will put in a catch and log it (and do it at a few more places in the same class when I am at it).
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@lolodomo Thanks for your review. Comments should have been addressed. |
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
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Fix dimmer control sequence Signed-off-by: Mark Herwege <mark.herwege@telenet.be> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Signed-off-by: Mark Herwege mark.herwege@telenet.be
Closes #11695
The sequence of on/off and brightness commands and status updates caused flickering with lamps on other binding channels following the binding channels. This fix adjusts the sequence to avoid setting the wrong brightness value for a short instance before setting the correct value.