Add wildcard support for ChannelEventTriggerHandler#5512
Conversation
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2214297 to
4109375
Compare
There was a problem hiding this comment.
Pull request overview
Adds wildcard (*, ?) support to core.ChannelEventTrigger so a single trigger definition can match multiple channel UIDs (similar to existing wildcard behavior for things/items), and updates module type descriptions/tests accordingly.
Changes:
- Introduce wildcard parsing for
channelUIDinChannelEventTriggerHandlervia a topic-regex-basedTopicEventFilter. - Add unit tests for
*and?channel wildcard matching. - Update i18n + module type JSON descriptions to document wildcard support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/ChannelEventTriggerHandler.java | Adds wildcard handling by switching to a TopicEventFilter when channelUID contains */?. |
| bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/ChannelEventTriggerHandlerTest.java | Adds tests for * and ? wildcard channel patterns. |
| bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation.properties | Documents wildcard support for channelUID configuration. |
| bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/ChannelTrigger.json | Documents wildcard support for channelUID configuration in the module type definition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…NotApplied case Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
|
@openhab/javascript-maintainers @openhab/python-maintainers this may require an update in the helper library's docs. Main doc update: openhab/openhab-docs#2717 |
See: openhab/openhab-core/pull/5512 Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Refs openhab/openhab-core#5512. Signed-off-by: Florian Hotze <dev@florianhotze.com>
Resolve #5504
Follow up TODO after this is merged: