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

[homekit] fix 100% brightness for dimmer #7932

Merged
merged 3 commits into from
Jun 17, 2020
Merged

Conversation

yfre
Copy link
Contributor

@yfre yfre commented Jun 17, 2020

small fix for dimmer logic

with PR #7825 a new logic for dimmer handling was introduced.
the new logic suppress either ON state or brightness update depending on the dimmer state and selected dimmer mode. e.g. do not sends "brightness=100%" update on "ON" event. this helps to handle different dimmers behaviours, e.g. soft launch

however, it is not possible anymore to increase brightness to 100%. see https://community.openhab.org/t/homekit-homekit-sending-on-and-100-command/99485/28?u=yfre

This PR adapt logic as follow:
the rule
IF "target state=ON" AND "target brightness=100" THEN do not update brightness
is changed to
IF "target state=ON" AND "target brightness=100" AND "current state = OFF" THEN do not update brightness

this means, if dimmer is already ON then it is possible to set brightness to 100%

Signed-off-by: Eugen Freiter [email protected]

Eugen Freiter added 3 commits June 17, 2020 10:42
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@J-N-K J-N-K merged commit 1babb80 into openhab:2.5.x Jun 17, 2020
@cpmeister cpmeister added the bug An unexpected problem or unintended behavior of an add-on label Jun 17, 2020
@cpmeister cpmeister added this to the 2.5.6 milestone Jun 17, 2020
@yfre yfre deleted the fix_100_brightness branch June 20, 2020 17:32
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this pull request Jul 12, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
* homekit dimmer. fix 100% brightness

Signed-off-by: Eugen Freiter <[email protected]>
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
Development

Successfully merging this pull request may close these issues.

4 participants