wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
240 stars 11 forks source link

Consider splitting the library into a device specific and a HA specific one #7

Closed attilaersek closed 3 months ago

attilaersek commented 4 months ago

Device type and model (or SN)

n/a

The description of new feature

@rokam already started a repository that contains only the device communication specific code. What's the status of that? I think it would be beneficial to use that as a package and remove the code from here and only maintain what is specific to HA. What do you think?

rokam commented 4 months ago

I do think it is a best pratice and a step tp merge this code in ha core. But I don't have enought time to code it all by myself. Any help is welcome.

attilaersek commented 4 months ago

I do think it is a best pratice and a step tp merge this code in ha core. But I don't have enought time to code it all by myself. Any help is welcome.

What is missing from your repository? Ofc, the test coverage, but that will be a huge work.

rokam commented 4 months ago

If we just set it up with initial coverage and automatic deploy to pipy. Also we should start typing the variables.

wuwentao commented 4 months ago

agreen with us, and I'm not familiar with midea_ac_lan detail code now, as I just use it, but I will try to read all the source code later, then I will try to help on test coverage and automation. we may need more time to do it, I'm not sure.

current repo don't have any lint rule or test coverage for PR merge, I will add github linter action to improve it fo PR and future changes, test coverage and new feature may have some delay. also will discuss with us later.

chemelli74 commented 4 months ago

Hi all,

I would like to contribute moving this integration to core. We can move by steps:

What you think about the plan ? I know that also @Necroneco would contribute as well.

As we are going to be a Team , the library could be placed on https://github.com/home-assistant-libs

Necroneco commented 4 months ago

I agree with moving to core, but it's a lot of work to do.

I'd love to help but don't have the time right now. Hopefully I can start in a few (one or two) weeks.

rokam commented 4 months ago

Hi all,

I would like to contribute moving this integration to core. We can move by steps:

  • introduce ruff
  • introduce the remaining pre-commit hooks
  • separate low level calls to device in a dedicated library
  • publish the library to pypi
  • move the HA integration to HA core

What you think about the plan ? I know that also @Necroneco would contribute as well.

As we are going to be a Team , the library could be placed on https://github.com/home-assistant-libs

I've already started a lib http://github.com/rokam/midea-local

rokam commented 4 months ago

13

wuwentao commented 4 months ago

Thanks all, we have more contributers to continue work with it now. I have invite/add @rokam @attilaersek @Necroneco @chemelli74 @Qianli-Ma as collaborators to current repo

All of use can merge PR in future and we don't need to worry about all the permission controlled in one people.

chemelli74 commented 4 months ago

Thanks all, we have more contributers to continue work with it now. I have invite/add @rokam @attilaersek @Necroneco @chemelli74 @Qianli-Ma as collaborators to current repo

All of use can merge PR in future and we don't need to worry about all the permission controlled in one people.

Thx for the invite!