Skip to content

Commit dc78511

Browse files
committed
Add generic converter that generates exposes based on device config
1 parent 79720e0 commit dc78511

File tree

5 files changed

+742
-2053
lines changed

5 files changed

+742
-2053
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,6 @@ update_converters:
236236
> zigbee2mqtt/converters/tuya_with_ota.js
237237
python3 helper_scripts/make_z2m_tuya_converters.py --z2m-v1 device_db.yaml \
238238
> zigbee2mqtt/converters_v1/tuya_with_ota.js
239-
python3 helper_scripts/make_z2m_custom_converters.py device_db.yaml \
240-
> zigbee2mqtt/converters/switch_custom.js
241239
python3 helper_scripts/make_z2m_custom_converters.py --z2m-v1 device_db.yaml \
242240
> zigbee2mqtt/converters_v1/switch_custom.js
243241

docs/ota_flash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ To follow these instructions, you need **zigbee2mqtt** installed. If you're usin
77

88
### Step 1: Download the Necessary Files
99
- [Converter for the original device](https://github.com/romasku/tuya-zigbee-switch/raw/refs/heads/main/zigbee2mqtt/converters/tuya_with_ota.js)
10-
- [Converter for custom firmware](https://github.com/romasku/tuya-zigbee-switch/raw/refs/heads/main/zigbee2mqtt/converters/switch_custom.js)
10+
- [Converter for custom firmware](https://github.com/romasku/tuya-zigbee-switch/raw/refs/heads/main/zigbee2mqtt/converters/switch_custom.mjs)
1111

1212
Place these files into `external_converters` subfolder of zigbee2mqtt data folder. If `external_converters` folder doesn't exists, create it.
1313

docs/porting_to_new_device.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Flashing firmware via OTA may break your device. Fixing it will require solderin
7878

7979
## Setting Up the Device After Update
8080

81-
First, install the [converter for custom firmware](https://github.com/romasku/tuya-zigbee-switch/raw/refs/heads/main/zigbee2mqtt/converters/switch_custom.js) to control the reflashed device. This is done the same way as for the converter for stock firmware.
81+
First, install the [converter for custom firmware](https://github.com/romasku/tuya-zigbee-switch/raw/refs/heads/main/zigbee2mqtt/converters/switch_custom.mjs) to control the reflashed device. This is done the same way as for the converter for stock firmware.
8282

8383
If everything goes correctly, the device will reboot and rejoin after the update. If it reboots but doesn't rejoin, wait at least 5 minutes, then try removing it from Z2M and resetting it by long-pressing the reset button or pressing a switch multiple times quickly. If nothing works, you'll need to disassemble the device and flash it by wire.
8484

0 commit comments

Comments
 (0)