Modification of an existing binding

Is it wrong to use an existing binding and make changes it to it to suit your purpose. It also means changing then name of the binding to your name.

Is there a reason it can’t be added to the existing binding so others can use it also?

I’m changing parts of the code.

Nothing is wrong but it does mean you are setting yourself up for more work in the future. As the original binding is enhanced, fixed, and updated it means you will have to reimplement your changes for every update.

A much better approach would be to do as @ranielsen suggests and look to see if the issue you are trying to solve exists already, if not create one, and submit a pull request so your enhancements can be shared with the wider community and so they will be included in all future versions of the binding.

Personally I would go to great lengths to avoid modifying an existing binding to the point of writing external scripts or programs that OH calls through the Exec binding rather than make a custom change to an existing binding that only I will use.

I am not enhancing it, I am just modifying it to achieve my purpose. Thank you for your answer.