Open msinn opened 2 years 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.
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.
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?
This issue is moved over from the core repo. The complete issue can be read over there: https://github.com/smarthomeNG/smarthome/issues/291