@homebridge-plugins/homebridge-tuya 3.0.0-beta.8 → 3.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADVANCED_OPTIONS.md +17 -0
- package/README.md +3 -1
- package/config.schema.json +287 -517
- package/dist/cloud/device/TuyaCloudDeviceManager.js +3 -1
- package/dist/cloud/device/TuyaCloudDeviceManager.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/local/LocalDeviceManager.js +52 -8
- package/dist/local/LocalDeviceManager.js.map +1 -1
- package/dist/shared/TuyaDeviceManager.js +14 -3
- package/dist/shared/TuyaDeviceManager.js.map +1 -1
- package/dist/shared/TuyaHybridDeviceManager.js.map +1 -1
- package/dist/shared/accessory/GarageDoorAccessory.js +19 -2
- package/dist/shared/accessory/GarageDoorAccessory.js.map +1 -1
- package/dist/shared/util/ConfigMigrator.js +13 -2
- package/dist/shared/util/ConfigMigrator.js.map +1 -1
- package/package.json +4 -4
- package/test/ConfigMigrator.test.ts +169 -4
package/ADVANCED_OPTIONS.md
CHANGED
|
@@ -20,6 +20,7 @@ Before configuring, you may need to:
|
|
|
20
20
|
- `category` - **optional**: Device category code. See [SUPPORTED_DEVICES.md](./SUPPORTED_DEVICES.md). Also you can use `hidden` to hide the device, product, or scene. **⚠️Overriding this property may lead to unexpected behaviors and exceptions, so please remove the accessory cache after making changes.**
|
|
21
21
|
- `unbridged` - **optional**: Unbridge accessories. Defaults to `false`.
|
|
22
22
|
- `adaptiveLighting` - **optional**: Adaptive Lighting. Defaults to `false`. Not all light device support this feature, please use it on demand.
|
|
23
|
+
- `garageDoorUseContactSensorForState` - **optional**: For garage door controllers. When `true`, `CurrentDoorState` and `TargetDoorState` reads use `doorcontact_state` only, while set commands still use `switch_1`. Defaults to `false`.
|
|
23
24
|
- `schema` - **optional**: An array of schema overriding config objects, used for describing datapoint (DP). When your device has non-standard DP, you need to transform them manually with configuration. Each element in the schema array is described as follows:
|
|
24
25
|
- `code` - **required**: DP code.
|
|
25
26
|
- `newCode` - **optional**: New DP code.
|
|
@@ -94,6 +95,22 @@ An example of hide camera's floodlight (`floodlight_switch`):
|
|
|
94
95
|
}
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
### Use garage door contact sensor for state
|
|
99
|
+
|
|
100
|
+
Some `ckmkzq` garage door controllers keep `switch_1` as `true`, which can make HomeKit show the door as stuck Opening or Closing. Enable this per-device option to read the door state from `doorcontact_state`, while commands are still sent to `switch_1`.
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
{
|
|
104
|
+
"options": {
|
|
105
|
+
// ...
|
|
106
|
+
"deviceOverrides": [{
|
|
107
|
+
"id": "{device_id}",
|
|
108
|
+
"garageDoorUseContactSensorForState": true
|
|
109
|
+
}]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
97
114
|
|
|
98
115
|
### Offline as off
|
|
99
116
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
4
4
|
|
|
5
5
|

|
|
6
|
-

|
|
7
7
|
|
|
8
8
|
[](https://github.com/sponsors/tassy-h)
|
|
9
9
|
[](https://npmjs.com/package/@homebridge-plugins/homebridge-tuya)
|
|
@@ -184,6 +184,8 @@ Uses cloud + local simultaneously. Provide both `options` (cloud) and `local` bl
|
|
|
184
184
|
### Advanced Options
|
|
185
185
|
See [ADVANCED_OPTIONS.md](./ADVANCED_OPTIONS.md)
|
|
186
186
|
|
|
187
|
+
Garage door controllers that keep `switch_1=true` can opt in to contact-sensor-only state reads with `garageDoorUseContactSensorForState` in `options.deviceOverrides`. This keeps commands on `switch_1`, but reads HomeKit state from `doorcontact_state`.
|
|
188
|
+
|
|
187
189
|
|
|
188
190
|
## Limitations
|
|
189
191
|
- Using the same app account for multiple Homebridge/HomeAssistant instances is not recommended. Use separate app accounts per instance.
|