1
+ export type Item = {
2
+ rawItem : HostItem ;
3
+ persistence : import ( "./items/item-persistence" ) ;
4
+ semantics : import ( "./items/item-semantics" ) ;
5
+ readonly type : string ;
6
+ readonly name : string ;
7
+ readonly label : string ;
8
+ readonly state : string ;
9
+ readonly numericState : number ;
10
+ readonly quantityState : import ( "./quantity" ) . Quantity ;
11
+ readonly rawState : HostState ;
12
+ readonly members : any [ ] ;
13
+ readonly descendents : any [ ] ;
14
+ readonly isUninitialized : boolean ;
15
+ getMetadata ( namespace ?: string ) : {
16
+ value : string ;
17
+ configuration : any ;
18
+ } | {
19
+ namespace : {
20
+ value : string ;
21
+ configuration : any ;
22
+ } ;
23
+ } ;
24
+ replaceMetadata ( namespace : string , value : string , configuration ?: any ) : {
25
+ configuration : any ;
26
+ value : string ;
27
+ } ;
28
+ removeMetadata ( namespace ?: string ) : {
29
+ value : string ;
30
+ configuration : any ;
31
+ } ;
32
+ sendCommand ( value : any ) : void ;
33
+ sendCommandIfDifferent ( value : any ) : boolean ;
34
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
35
+ sendToggleCommand ( ) : void ;
36
+ postToggleUpdate ( ) : void ;
37
+ postUpdate ( value : any ) : void ;
38
+ readonly groupNames : string [ ] ;
39
+ addGroups ( ...groupNamesOrItems : any [ ] ) : void ;
40
+ removeGroups ( ...groupNamesOrItems : any [ ] ) : void ;
41
+ readonly tags : string [ ] ;
42
+ addTags ( ...tagNames : string [ ] ) : void ;
43
+ removeTags ( ...tagNames : string [ ] ) : void ;
44
+ toString ( ) : any ;
45
+ } ;
1
46
/**
2
47
* Creates a trigger that fires upon specific events in a channel.
3
48
*
@@ -26,7 +71,7 @@ export function ChannelEventTrigger(channel: string, event: string, triggerName?
26
71
* @param {string } [newState] the new state of the Item
27
72
* @param {string } [triggerName] the optional name of the trigger to create
28
73
*/
29
- export function ItemStateChangeTrigger ( itemOrName : any | string , oldState ?: string , newState ?: string , triggerName ?: string ) : HostTrigger ;
74
+ export function ItemStateChangeTrigger ( itemOrName : Item | string , oldState ?: string , newState ?: string , triggerName ?: string ) : HostTrigger ;
30
75
/**
31
76
* Creates a trigger that fires upon an Item receiving a state update. Note that the Item does not need to change state.
32
77
*
@@ -39,7 +84,7 @@ export function ItemStateChangeTrigger(itemOrName: any | string, oldState?: stri
39
84
* @param {string } [state] the new state of the Item
40
85
* @param {string } [triggerName] the optional name of the trigger to create
41
86
*/
42
- export function ItemStateUpdateTrigger ( itemOrName : any | string , state ?: string , triggerName ?: string ) : HostTrigger ;
87
+ export function ItemStateUpdateTrigger ( itemOrName : Item | string , state ?: string , triggerName ?: string ) : HostTrigger ;
43
88
/**
44
89
* Creates a trigger that fires upon an Item receiving a command. Note that the Item does not need to change state.
45
90
*
@@ -52,7 +97,7 @@ export function ItemStateUpdateTrigger(itemOrName: any | string, state?: string,
52
97
* @param {string } [command] the command received
53
98
* @param {string } [triggerName] the optional name of the trigger to create
54
99
*/
55
- export function ItemCommandTrigger ( itemOrName : any | string , command ?: string , triggerName ?: string ) : HostTrigger ;
100
+ export function ItemCommandTrigger ( itemOrName : Item | string , command ?: string , triggerName ?: string ) : HostTrigger ;
56
101
/**
57
102
* Creates a trigger that fires upon a member of a group changing state. Note that group Item does not need to change state.
58
103
*
@@ -65,7 +110,7 @@ export function ItemCommandTrigger(itemOrName: any | string, command?: string, t
65
110
* @param {string } [newState] the new state of the group
66
111
* @param {string } [triggerName] the optional name of the trigger to create
67
112
*/
68
- export function GroupStateChangeTrigger ( groupOrName : any | string , oldState ?: string , newState ?: string , triggerName ?: string ) : HostTrigger ;
113
+ export function GroupStateChangeTrigger ( groupOrName : Item | string , oldState ?: string , newState ?: string , triggerName ?: string ) : HostTrigger ;
69
114
/**
70
115
* Creates a trigger that fires upon a member of a group receiving a state update. Note that group Item does not need to change state.
71
116
*
@@ -77,7 +122,7 @@ export function GroupStateChangeTrigger(groupOrName: any | string, oldState?: st
77
122
* @param {string } [state] the new state of the group
78
123
* @param {string } [triggerName] the optional name of the trigger to create
79
124
*/
80
- export function GroupStateUpdateTrigger ( groupOrName : any | string , state ?: string , triggerName ?: string ) : HostTrigger ;
125
+ export function GroupStateUpdateTrigger ( groupOrName : Item | string , state ?: string , triggerName ?: string ) : HostTrigger ;
81
126
/**
82
127
* 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.
83
128
*
@@ -89,7 +134,7 @@ export function GroupStateUpdateTrigger(groupOrName: any | string, state?: strin
89
134
* @param {string } [command] the command received
90
135
* @param {string } [triggerName] the optional name of the trigger to create
91
136
*/
92
- export function GroupCommandTrigger ( groupOrName : any | string , command ?: string , triggerName ?: string ) : HostTrigger ;
137
+ export function GroupCommandTrigger ( groupOrName : Item | string , command ?: string , triggerName ?: string ) : HostTrigger ;
93
138
/**
94
139
* Creates a trigger that fires upon a Thing status updating.
95
140
*
@@ -182,7 +227,7 @@ export function TimeOfDayTrigger(time: string, triggerName?: string): HostTrigge
182
227
* @param {boolean } [timeOnly=false] Specifies whether only the time of the Item should be compared or the date and time.
183
228
* @param {string } [triggerName] the optional name of the trigger to create
184
229
*/
185
- export function DateTimeTrigger ( itemOrName : any | string , timeOnly ?: boolean , triggerName ?: string ) : HostTrigger ;
230
+ export function DateTimeTrigger ( itemOrName : Item | string , timeOnly ?: boolean , triggerName ?: string ) : HostTrigger ;
186
231
/**
187
232
* Creates a trigger for the {@link https://openhab.org/addons/automation/pwm/ Pulse Width Modulation (PWM) Automation} add-on.
188
233
*
0 commit comments