Making a core component I wrote a custom component

A while ago, I wrote a component for syncthru supporting printers and submitted it to the core project. The component uses a JSON-REST-API present in many Samsung printers, however not all of them. I recently updated the underlying python package to also support printers that have only a web-interface available (also called syncthru), and to web-scraping to obtain some useful values. However, this violates the core development guides and hence cannot be included in the standard component.

Since the underlying package is already upgraded, I would like to create a custom component that makes use of the web-scraping capabilities. Since the component code is also already written, my first idea would be to simply copy the code from the built-in syncthru component into a standalone custom component repository. My main question is: is this legal/ are there legal ways to do it? What is the best way to inform the HA team about it and which licenses should I use? How should I refer to the origin of the code?

Any suggestions? Thanks in advance for any input.

You are fee to build on any of the core components. That’s the beauty of open source.

It is polite to mention in your repository that you built on the work of others (who / what). As it was your work in this case you don’t even need to do that.

Relevant licence details:

2. Grant of Copyright License. Subject to the terms and conditions of
  this License, each Contributor hereby grants to You a perpetual,
  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  copyright license to reproduce, prepare Derivative Works of,
  publicly display, publicly perform, sublicense, and distribute the
  Work and such Derivative Works in Source or Object form.

From here: https://www.home-assistant.io/developers/license/

If you wrote the original code, you own the copyright to it and you can do what you please with it. (Unless HA is one of those projects which requires you to assign your copyright).

Thanks for the quick responses! I will go forward an create a new repository then :slight_smile: