-
Notifications
You must be signed in to change notification settings - Fork 4
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 DPT232 #5
Add DPT232 #5
Conversation
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 Greig,
thanks for your contribution! Of course, I'm happy to add more KNX DPTs! Until now I've been lazy and only added the few DPTs needed for the KNX devices at my parents' home.
However, please take a look at my comments about the Python types returned/accepted by the decode/encode functions. I'd like to keep them as consistent and semantically fitting as possible.
Thanks Michael. I'll get onto these. (Sorry for the slow response - I didn't receive any notification from GitHub that you'd responded). |
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.
Looks good! :)
Thanks for trying out and getting all the types to work. I have only one small suggestion for the test:
With your consent I was going to cherry-pick a few more easy DPTs to add (into new PRs):
Maybe if I can get a few of those completed over the holidays they'd justify an updated release? (If I get REALLY keen i might try some of the more complicated ones too, although some will require a bit of back-and-forth between us to determine the right config strategy. e.g. DPT's 21 & 22, and DPT 256, start-stop time, which is just 2 x 19's back-to-back.) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5 +/- ##
==========================================
- Coverage 93.49% 93.36% -0.13%
==========================================
Files 4 4
Lines 415 422 +7
==========================================
+ Hits 388 394 +6
- Misses 27 28 +1 ☔ View full report in Codecov by Sentry. |
Hi Michael,
This PR adds encoding and decoding of DPT 232.
I've never written unit tests before, but I think what I've done is valid:
Let me know if anything's not quite right and I'll amend as required.
If you're OK with it I'll add more DPTs as users of my captureKNX bring them to my attention??
Thanks.
- Greig.