Skip to content

Commit 2ffce34

Browse files
committed
Update
1 parent db22041 commit 2ffce34

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ADVANCED_OPTIONS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Before configuring, you may need to:
2727
- `onSet` - **optional**: A one-line JavaScript code to convert the new value to the old value. The function is called with two arguments: `device` and `value`. Returning `undefined` means to skip sending the command.
2828
- `hidden` - **optional**: Whether to hide the schema. Defaults to `false`.
2929

30+
3031
## Examples
3132

3233
### Hide device / scene
@@ -43,6 +44,7 @@ Before configuring, you may need to:
4344
}
4445
```
4546

47+
4648
### Offline as off
4749

4850
If you want to display off status when device is offline:
@@ -61,6 +63,7 @@ If you want to display off status when device is offline:
6163
}
6264
```
6365

66+
6467
### Change DP code
6568

6669
```js
@@ -78,6 +81,7 @@ If you want to display off status when device is offline:
7881
}
7982
```
8083

84+
8185
### Convert from enum DP to boolean DP
8286

8387
A example of convert `open`/`close` into `true`/`false`.
@@ -98,6 +102,7 @@ A example of convert `open`/`close` into `true`/`false`.
98102
}
99103
```
100104

105+
101106
### Adjust integer DP ranges
102107

103108
Some odd thermostat stores double of the real value to keep the decimal part (0.5°C).
@@ -143,6 +148,7 @@ Here's the example config:
143148

144149
After transform value using `onGet` and `onSet`, and new range in `property`, it should be working now.
145150

151+
146152
### Reverse curtain motor's on/off state
147153

148154
Most curtain motor have "reverse mode" setting in the Tuya App, if you don't have this, you can reverse `percent_control`/`position` and `percent_state` in the plugin config:
@@ -167,6 +173,7 @@ Most curtain motor have "reverse mode" setting in the Tuya App, if you don't hav
167173
}
168174
```
169175

176+
170177
### Skip send on/off command when touching brightness/speed slider
171178

172179
Some products (dimmer, fan) having issue when sending brightness/speed command with on/off command together. Here's an example of skip on/off command.
@@ -186,6 +193,7 @@ Some products (dimmer, fan) having issue when sending brightness/speed command w
186193
}
187194
```
188195

196+
189197
### Convert Fahrenheit to Celsius
190198

191199
F = 1.8 * C + 32

0 commit comments

Comments
 (0)