smarthomeNG / plugins

Plugins for SmartHomeNG - The device integration platform for your smart home
https://www.smarthomeNG.de
45 stars 102 forks source link

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

Open msinn opened 2 years ago

msinn commented 2 years ago

This issue is moved over from the core repo. The complete issue can be read over there: https://github.com/smarthomeNG/smarthome/issues/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 commented 1 year ago

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 commented 1 year ago

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 https://github.com/smarthomeNG/smarthome/issues/291#issuecomment-439444212 it would be fine imho.

onkelandy commented 2 weeks ago

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?