Developing custom devices from TypeScript instead of JavaScript #24162
mortenmoulder
started this conversation in
Devices
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a few devices added to Zigbee2MQTT already. My own devices. I want to modify them, because there's a new firmware update. I originally wrote them in JavaScript, so I could easily use the external_converters, but then I had to re-write them in TypeScript for the repository.
This seems like a cumbersome way of developing.
Instead, would it be possible to build it in TypeScript, then compile/build to a JavaScript, that can then be tested in Zigbee2MQTT?
My devices are added in the custom_devices_diy.ts file, and if I run
npm run build
, I get the "platform compatible" file, that should not be modified directly.What I want is to go from TS -> JS, that can be imported into external_converters easily and without modifications. I do not have a backup of my JavaScript file I used for development over a year ago, so I am stuck with the TypeScript file, that Zigbee2MQTT does not support out of the box.
Beta Was this translation helpful? Give feedback.
All reactions