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

[astro] Add option to force event to occur #14132

Conversation

lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Jan 1, 2023

Signed-off-by: lsiepel leosiepel@gmail.com

Trigger channels have an earliest start / latest end option to 'manualy' control/override event (e.g. sunrise, sunset ) starts/ ends to occur. There are cases that the event is not happening at all (e.g. astro dawn during summer in Sweden). This PR adds an option to the trigger channel config to 'force' the event to take place even when it is actually not happening. For the start/ end it uses the earliest /latest config setting.
this setting defaults to false, so it should not affect existing set-ups.

Also add tests to assure behaviour is consistent with and without the ChannelConfig 'forceEvents' set to true.

Resolves: #11424

Signed-off-by: lsiepel <leosiepel@gmail.com>
@lsiepel lsiepel requested a review from gerrieg as a code owner January 1, 2023 14:20
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Jan 1, 2023
@lolodomo lolodomo added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jan 21, 2023
Signed-off-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: lsiepel <leosiepel@gmail.com>
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, thank you

@lolodomo lolodomo merged commit 15a25db into openhab:main Jan 29, 2023
@lolodomo lolodomo added this to the 4.0 milestone Jan 29, 2023
@lsiepel lsiepel deleted the 11424-astro-should-respect-configured-earliest-or-latest-channel-time branch January 29, 2023 21:23
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* fix issue 11424

Signed-off-by: lsiepel <leosiepel@gmail.com>
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
* fix issue 11424

Signed-off-by: lsiepel <leosiepel@gmail.com>
FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
* fix issue 11424

Signed-off-by: lsiepel <leosiepel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[astro] should respect configured earliest or latest channel time
2 participants