Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From Ewelink : Add Dooya Curtain,Reax Curtain and AK Curtain. #8510

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

CubeZ2mDeveloper
Copy link
Contributor

Hello, I am an employee at EweiLink. This is my first time submitting a PR for ZHC, and the purpose is to familiarize myself with the entire PR process for smoother collaboration in the future. If the PR is successfully approved, I will synchronize all devices currently supported by the two manufacturers, Ewelink and Sonoff, to ZHC!!

features:

  1. Add Dooya Curtain
    • Model: CK-MG22-JLDJ-01(7015)
    • Model: CK-MG22-Z310EE07DOOYA-01(7015)
    • Model: MYDY25Z-1
    • Model: Grandekor Smart Curtain Grandekor
  2. Add Reax Curtain
    • Model: MYRX25Z-1
  3. Add AK Curtain
    • Model: AM25B-1-25-ES-E-Z
    • Model: ZM25-EAZ
    • Model: AM25C-1-25-ES-E-Z

All the above features are successfully running on our gateway based on Z2M!!

@@ -31,6 +722,108 @@ export const ewelinkModernExtend = {
voltageReportingConfig: {min: 3600, max: 7200, change: 10},
});
},
ewelinkWindowCovering(args: WindowCoveringArgs): ModernExtend {
args = {stateSource: 'lift', configureReporting: true, ...args};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you call the windowCovering modernExtend here and extend based on that instead of duplicating all the code?

const ea = access;

// ====================== Type Or Interface ==============================
interface WindowCoveringArgs {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please extend the existing WindowCoveringArgs


// ======================= Custom FZ =====================================
export const ewelinkFromZigbee = {
cover_position_tilt: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also prevent code duplication here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. We will modify the code, complete the testing, and resubmit it

@CubeZ2mDeveloper
Copy link
Contributor Author

Hello, I have reused the windowCovering modernExtend as per your request. Please review it again.

@Koenkk Koenkk merged commit c146ce8 into Koenkk:master Dec 24, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 24, 2024

Thanks!

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that:

  • The filename is CK-MG22-JLDJ-01(7015).png (and MYRX25Z-1.png, AM25B-1-25-ES-E-Z.png)
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants