Skip to content

Commit 823bfa7

Browse files
committed
Add documentation in readme for infrared messages
1 parent b263a55 commit 823bfa7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,36 @@ light.colorRgb(255, 0, 0); // Set to red
137137
light.colorRgb(255, 255, 0); // Set to yellow
138138
```
139139

140+
#### `light.maxIR(brightness, callback)`
141+
Set's the maximum infrared brightness of the light (only for lights that support infrared light)
142+
143+
Option | Type | Default | Description
144+
------ | ---- | ------- | -----------
145+
`brightness` | int | | Between 0 and 100, representing the light brightness from 0% to 100%.
146+
`callback` | function | | `function(error, data) {}`
147+
148+
Usage examples:
149+
```js
150+
light.maxIR(0); // Set's a maximum infrared brightness of 0
151+
light.maxIR(25); // Set's a maximum infrared brightness of 25
152+
```
153+
154+
#### `light.getMaxIR(callback)`
155+
Requests the maximum infrared brightness of the light (only for lights that support infrared light)
156+
157+
Option | Type | Default | Description
158+
------ | ---- | ------- | -----------
159+
`callback` | function | | `function(error, data) {}`
160+
161+
Example result:
162+
```js
163+
null,
164+
{
165+
brightness: 25
166+
}
167+
```
168+
169+
140170
### Requesting light state and info
141171
Infos of the state and spec of the light can be requested with the following methods:
142172

0 commit comments

Comments
 (0)