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

knx: Improvement for DPT 2 (num instead of list) #565

Open
msinn opened this issue Jan 30, 2022 · 3 comments
Open

knx: Improvement for DPT 2 (num instead of list) #565

msinn opened this issue Jan 30, 2022 · 3 comments

Comments

@msinn
Copy link
Member

msinn commented Jan 30, 2022

This issue is moved over from the core repo. The complete issue can be read over there: smarthomeNG/smarthome#291

To easily change DPT 2 knx entries via VISU it would be more comfortable to set priorities not only as lists but also as a number. The ETS converts simple numbers to lists as follows:
0 = [0,0]
1 = [0,1]
2 = [1,0]
3 = [1,1]

Such an internal conversion for DPT2 items would be very nice or are there any reasons this is a bad idea?

@Morg42
Copy link
Member

Morg42 commented Sep 6, 2023

Not sure if this is still an issue, but after reading through all the earlier discussion, I would also prefer variant two, the "environment-aware cast". It seems more elegant, more natural and more pythonic.

Not knowing a real use-case, this might not be helpful for the original problem ;) but seeing as this is quite old and seems unresolved - and above that, simple to implement, we could go ahead and decide, and then close the issue.

@onkelandy
Copy link
Member

It's for sure still an issue. I solved it by using this logic: https://smarthomeng.github.io/dev_doc/beispiele/logiken/beispiel_dpt2.html

However, an internal solution would be appreciated. If we could go for something like that smarthomeNG/smarthome#291 (comment) it would be fine imho.

@onkelandy
Copy link
Member

How do we tackle this..? The last idea was to keep hands off knx_dpt 2 (and 3?) in the plugin but use the item conversion, correct..? I am honestly not sure where to implement that exactly. Does that still need to be done in the knx plugin?

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

No branches or pull requests

3 participants