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
[knx] DPT 1 to support Switch and Contact #16238
Conversation
* Allow assigning Switch or Contact to most of the DPT 1 subtypes (exceptions 1.008 UpDownType, 1.010 StopMoveType, 1.022 DecimalType). * Tests for all published subtypes for DPT 1. * Fix sending of DPT 1.022. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
I guess this does not fix #9747, but does it in someway improve that? |
It does not, and this is intended. It allows to map DPTs that could previously be mapped to switch items also to be mapped to contact items. |
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.
LGTM, double check before i merge: Would it be usefull to have a note/comment in the readme about this DPT 1 'fallback' functionality'?
@lsiepel Thanks for asking. We do not state possible conversions in the README, just the default DPTs for the different types. So you could just go on.... |
* Allow assigning Switch or Contact to most of the DPT 1 subtypes (exceptions 1.008 UpDownType, 1.010 StopMoveType, 1.022 DecimalType). * Tests for all published subtypes for DPT 1. * Fix sending of DPT 1.022. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
* Allow assigning Switch or Contact to most of the DPT 1 subtypes (exceptions 1.008 UpDownType, 1.010 StopMoveType, 1.022 DecimalType). * Tests for all published subtypes for DPT 1. * Fix sending of DPT 1.022. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> Signed-off-by: René Ulbricht <rene_ulbricht@outlook.com>
* Allow assigning Switch or Contact to most of the DPT 1 subtypes (exceptions 1.008 UpDownType, 1.010 StopMoveType, 1.022 DecimalType). * Tests for all published subtypes for DPT 1. * Fix sending of DPT 1.022. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
This PR has been initiated because of a discussion in the (German speaking) KNX User Forum.
DPT1 implementation had a rather strict mapping to types before. A Contact could not be used if the specific DPT was added to the group address definition
ga="1.011:<17/1/38"
, unless it was 1.009 or 1.019. As only subtypes 009 and 019 were mapped to OpenClosedType and the fallback for other DPTs was OnOffType,