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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CubeZ2mDeveloper
Copy link

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
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
Author

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

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