Skip to content
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

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Conversation

mherwege
Copy link
Contributor

@mherwege mherwege commented Dec 8, 2021

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.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@mherwege mherwege added the bug An unexpected problem or unintended behavior of an add-on label Dec 8, 2021
@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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>
@mherwege
Copy link
Contributor Author

mherwege commented Dec 9, 2021

@lolodomo Thanks for your review. Comments should have been addressed.

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lolodomo lolodomo merged commit 4697155 into openhab:main Dec 9, 2021
@lolodomo lolodomo added this to the 3.2 milestone Dec 9, 2021
@mherwege mherwege deleted the dimmer branch December 11, 2021 14:33
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
* Fix dimmer control sequence

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
2 participants