Skip to content

Allow to disable turning on light with brightness up command #799

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Alcoinus
Copy link

Thank you for taking the time to work on a Pull Request. Your contribution is really appreciated! 🎉
Please don't delete any part of the template, since keeping the provided structure will help maintainers to review your work more rapidly.

Sections marked as * are required and need to be filled in.

Proposed change*

This adds a configuration option to the light hook, which allows to disable turning on a light with brightness up command. Right now, when a light is turned off and brightness up command (both single or repeat) is received, the light will be turned on. As this might not be wanted all the time, when unchecking the option, brightness up commands will be dropped when a light is turned off.

The functionality of the smooth power on option stays unchanged but is now dependent of the newly added option.

The initial reason, why I looked into this, is fixed with the second commit of this PR. My particular light (a Zigbee group of two lights) takes some time to report the brightness value after being turned on. Even after the transition time, it takes another 50 to 100 milliseconds until a brightness value is reported. To deal with this, I introduced a wait action with a timeout of 1 second.

Checklist*

  • I followed sections of the Contribution Guidelines relevant to changes I'm proposing.
  • I properly tested proposed changes on my system and confirm that they are working as expected.
  • I formatted files with Prettier using the command npm run format before submitting my Pull Request.

Copy link
Contributor

Hey @Alcoinus, thank you so much for your contribution! 🚀

🔄 We're currently running a few checks to make sure that everything is great with your contribution.
If further actions need to be performed before your contribution can be reviewed, additional guidance will be provided to you in the next comment.

Results are coming soon, stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant