-
Notifications
You must be signed in to change notification settings - Fork 757
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
Add modern configuration options for SIN-4-RS-20 and SIN-4-RS-20_PRO #3901
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3901 +/- ##
==========================================
+ Coverage 90.96% 90.99% +0.02%
==========================================
Files 327 328 +1
Lines 10606 10637 +31
==========================================
+ Hits 9648 9679 +31
Misses 958 958 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good otherwise.
class NodOnWindowCovering(WindowCovering, CustomCluster): | ||
"""NodOn custom WindowCovering cluster.""" | ||
|
||
class AttributeDefs(BaseAttributeDefs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to not inherit from WindowCovering.AttributeDefs
here?
If that's done, we could remove all the copied attributes from zigpy below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the other attributes have the same attribute id. Hmm..
Does it not work if both are included? There should be a difference because of the manufacturer id. But it might not work with zigpy cache and some other zigpy parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the attributes have same IDs. Happy to inherit and override if there is an easy way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't work of if I just inherit. It was my first approach and it didn't work.
step=10, | ||
unit=UnitOfTime.MILLISECONDS, | ||
device_class=NumberDeviceClass.DURATION, | ||
initially_disabled=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should removed initially_disabled=True
everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. I don't have a strong opinion but these parameters are to fine-tune or override settings after internal calibration procedure. So, they are not much useful by default. Hence, I think it makes sense to keep them disabled by default.
Proposed change
This PR adds the following configuration options for NodOn roller shutter SIN-4-RS-20 and PRO version
All these settings allow fine-tune calibration if necessary.
Additional information
This is a port of https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/nodon.ts#L16
Checklist
pre-commit
checks pass / the code has been formatted using Black