core icon indicating copy to clipboard operation
core copied to clipboard

Add LedSC integration

Open PatrikKr010 opened this issue 9 months ago • 1 comments

Breaking change

Proposed change

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New integration (thank you!)
  • [ ] New feature (which adds functionality to an existing integration)
  • [ ] Deprecation (breaking change to happen in the future)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [ ] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [x] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [x] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • [ ] Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

PatrikKr010 avatar May 06 '24 20:05 PatrikKr010

Hi @tr4nt0r, Communication is done using websocket. The pythoni library requests, which is available in PyPi, is used for this. This library has been added to requirements.

I wrote the WebSC application with which the communication takes place in the interaction. This application is used to remove the hardware part and transfer it to the websocket API.

I can separate the integration part into a separate library that will take care of the communication with WebSC, but I find it redundant.

Is this separation necessary?

PatrikKr010 avatar May 27 '24 22:05 PatrikKr010

Hi @tr4nt0r, Communication is done using websocket. The pythoni library requests, which is available in PyPi, is used for this. This library has been added to requirements.

I wrote the WebSC application with which the communication takes place in the interaction. This application is used to remove the hardware part and transfer it to the websocket API.

I can separate the integration part into a separate library that will take care of the communication with WebSC, but I find it redundant.

Is this separation necessary?

requests is already part of Home Assistant, so it's quite redundant to add it to the manifest but anyway, the maintainers are pretty strict about this and requests is simply not considered a device specific abstraction layer, it is just an http client

tr4nt0r avatar May 27 '24 22:05 tr4nt0r

Hi @tr4nt0r I added an abstract layer that handles communication with WebSC Websocket API. This layer is the websc-client library. I hope this abstraction is OK.

PatrikKr010 avatar May 29 '24 23:05 PatrikKr010

It is required to have tests at least for the config flow. Files that are not covered by tests must be added to .coveragerc

Done

PatrikKr010 avatar May 30 '24 18:05 PatrikKr010

I fixed the tests. Now all tests are passing. I added a strings.json file, but it doesn't work. But I don't know if I understand its principle correctly.

PatrikKr010 avatar Jun 02 '24 12:06 PatrikKr010

Also i had the impression you are the manufacturer of these devices or somehow associated with them, or am i wrong? If so, maybe this could be interesting for you:

  • https://partner.home-assistant.io/
  • https://www.home-assistant.io/blog/2022/07/12/partner-program/

tr4nt0r avatar Jun 19 '24 05:06 tr4nt0r

Hey @PatrikKr010,

I just checked your website, ledsc.eu, and apparently I can't order anything. Could you please elaborate on what your plans are and what the product is?

Thanks!

joostlek avatar Jun 27 '24 16:06 joostlek

Hello, Yes, the product cannot be ordered yet. The development and testing is completely finished. We are currently working on the launch of production and arranging the distribution of our product.
As soon as we have finished this work and the integration into Home assistant is released, we will start selling our product.

PatrikKr010 avatar Jun 27 '24 17:06 PatrikKr010

Thanks for contribution and for the information about the current state of the product. We appreciate the effort you’ve put into developing this integration.

However, we only include integrations for products or services that are currently available for our users. This ensures that our community can immediately benefit from and support the integration in further open source development.

We recommend publishing your integration as a custom component for now. Once your product is available on the market and the custom integration has had time to mature, we would be happy to re-evaluate and review a new pull request for inclusion of your integration in the core repository.

Thank you for understanding, and looking forward to seeing your product’s hitting the market!

joostlek avatar Jun 27 '24 19:06 joostlek