-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Added group and system triggers to automation component #1509
Conversation
Signed-off-by: Kai Kreuzer <kai@openhab.org>
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.
Thanks. I left some comments inside.
...ain/java/org/openhab/core/automation/internal/module/handler/GroupCommandTriggerHandler.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openhab/core/automation/internal/module/handler/GroupCommandTriggerHandler.java
Show resolved
Hide resolved
...ain/java/org/openhab/core/automation/internal/module/handler/GroupCommandTriggerHandler.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openhab/core/automation/internal/module/handler/GroupCommandTriggerHandler.java
Outdated
Show resolved
Hide resolved
.../main/java/org/openhab/core/automation/internal/module/handler/GroupStateTriggerHandler.java
Outdated
Show resolved
Hide resolved
"description": "the received command", | ||
"required": false, | ||
"limitToOptions": false, | ||
"options": [ |
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.
What about other Commands (e.g. PLAY
, PAUSE
, etc.)?
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.
Might become a rather long list - I did it the same way here as we have it for all the other item triggers, so this is in line. It can be discussed whether only the most frequently used commands should be listed or all enum types, but this can be done in a separate PR if needed.
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.
Yes, I know. Does it make sense to add / introduce a "context": "command" for these options? Then is can be handled globally?
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.
Might be an option, but it would possibly shift the implementation work to the UIs then.
I would wait and see how it is really used in daily life and what we feel is missing and should be changed. I don't have a clear view on it yet.
...g.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/ItemTriggers.json
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/events/system/SystemEventFactory.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/core/automation/internal/module/handler/SystemTriggerHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Thanks @cweitkamp, I have addressed your comments. |
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.
Thanks for addressing them. Do not call me nit-picking. I some additional remarks.
bundles/org.openhab.core/src/main/java/org/openhab/core/events/system/StartlevelEvent.java
Show resolved
Hide resolved
.../main/java/org/openhab/core/automation/internal/module/handler/GroupStateTriggerHandler.java
Outdated
Show resolved
Hide resolved
.../main/java/org/openhab/core/automation/internal/module/handler/GroupStateTriggerHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Thanks again, @cweitkamp, everything should be addressed now! |
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. Thanks for your work.
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/jython-when-item-added-removed-modified-not-working/100994/4 |
…penhab#1509) * Added group and system triggers to automation component Signed-off-by: Kai Kreuzer <kai@openhab.org> GitOrigin-RevId: d265e16
This PR completes the automation component to provide the same triggers as the "old" rule engine. It thus specifically adds modules for "member of group" triggers as well as a start level trigger, which can be used to run rules once at system startup (disclaimer: No start level events are defined in this PR yet, so the trigger itself is still rather useless).
This was part of #1451 and has been separated as an independent PR that can already been reviewed and merged independently.
Signed-off-by: Kai Kreuzer kai@openhab.org