Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/triggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ function _createTrigger (typeString, name, config) {
/**
* Creates a trigger that fires upon specific events in a channel.
*
* `*` (zero or more characters) and `?` (zero or one characters) wildcards have been supported since openHAB 5.2.
* They can be used to match multiple Things and channels, e.g. `astro:*` matches all Things from the Astro binding.
*
* @example
* // trigger on all sun rise START events
* ChannelEventTrigger('astro:sun:local:rise#event', 'START');
* // triggers on all START events of any Astro Things' channels
* ChannelEventTrigger('astro:*#event', 'START');
*
* @memberof triggers
* @param {string} channel the name of the channel
Expand Down
17 changes: 17 additions & 0 deletions types/triggers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ export type Item = {
readonly groupType: string;
readonly name: string;
readonly label: string;
/**
* Creates a trigger that fires upon a member of a group receiving a command. Note that the group Item does not need to change state.
*
* @example
* GroupCommandTrigger('my_group', 'OFF');
*
* @memberof triggers
* @param {Item|string} groupOrName the group {@link Item} or the name of the group to monitor for commands
* @param {string} [command] the command received
* @param {string} [triggerName] the optional name of the trigger to create
*/
readonly category: string;
readonly state: string;
readonly numericState: number;
Expand Down Expand Up @@ -72,8 +83,14 @@ export type Item = {
/**
* Creates a trigger that fires upon specific events in a channel.
*
* `*` (zero or more characters) and `?` (zero or one characters) wildcards have been supported since openHAB 5.2.
* They can be used to match multiple Things and channels, e.g. `astro:*` matches all Things from the Astro binding.
*
* @example
* // trigger on all sun rise START events
* ChannelEventTrigger('astro:sun:local:rise#event', 'START');
* // triggers on all START events of any Astro Things' channels
* ChannelEventTrigger('astro:*#event', 'START');
*
* @memberof triggers
* @param {string} channel the name of the channel
Expand Down
2 changes: 1 addition & 1 deletion types/triggers.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading