Closed ssalonen closed 2 months ago
@rkoshak thoughts on this one? Does this make from core architecture point of view?
I find the ability to transform channel of type X to item of type Y using profiles is really powerful. It seems to work now (UI config workaround described in the first post) but I am not sure how officially supported it is.
I agree with this one. There are a number of new things that recent changes to Profiles have made possible that are not accounted for in MainUI. In particular the ability to change the type of the Item from a Number to a Switch (for example) which, prior to 3.2 (maybe even as recent as 3.3) was not possible.
I think MainUI is simply lagging behind those changes and needs to be updated.
Edit to note that I've been pushing for the ability to change the Item type like this periodically for a very long time (at least as far back as OH 2.0). I've always been annoyed that the Network Status binding followed by the Network binding shows the online/offline state of a network device using a Switch instead of a Contact. I'm super happy that we finally have this ability.
Easy would be to remove the item filter in https://github.com/openhab/openhab-webui/blob/d915c8aec96a1959b8b97b161ac9c7dd74224e47/bundles/org.openhab.ui/web/src/pages/settings/things/link/link-add.vue#L39
Is there more user friendly way to handle this?
Would PR be accepted to remove the item filter? I do understand the downsides with this as well.
As I was working on https://github.com/openhab/openhab-addons/issues/14058, I hit this issue once again. In modbus 4.0 I was planning to offer one channel, meant to offer the data as percent (%).
Now due to this UI limitation, it seems I should either
For now, I am resorting to advicing user to work-around the issue in docs:
Check out README at https://github.com/ssalonen/openhab2-addons/tree/modbus-14058/bundles/org.openhab.binding.modbus (ctrl+f search with "due to MainUI limitation"). Perhaps worst example is the one with Rollershutter Item: https://github.com/ssalonen/openhab2-addons/tree/modbus-14058/bundles/org.openhab.binding.modbus#rollershutter-example
I have just created a draft PR to finally address this issue: #2690. Please have a look and check if my logic there is correct.
The problem
When linking a Number channel, it is impossible to select Switch item to link to
I use profile to transform the numbers to ON/OFF type.
As a workaround, it is possible to change item type temporarily to Number, do the channel link, and revert item type back to Switch.
Expected behavior
UI would not filter out items of different type when linking channels. Thanks to profiles, otherwise "incompatible" types should be linkable.
Steps to reproduce
Your environment
Browser console
Browser network traffic
Additional information