I spent hours to find a list of possible values for props and parameters like "context: ", "type: " and so on for customizing the “Set Props” dialog.
Where can I find a (detailed) documentation about widget-properties? The following page doesn’t really answer all of my questions regarding properties of custom widget: root-components-props
For example, I would like to set a boolean value through a checkbox, or set a string through a selection in a dropdown field with predetermined values (in the “Set Props” dialog).
You can get some idea of the available types and the context values associated with those by looking through the source code of the parameter viewer:
For example from there you can see that types is just TEXT, INTEGER, DECIMAL, or BOOLEAN. Your boolean value will be a toggle switch and not a checkbox but just set type to BOOLEAN.
Context then only really applies to all the different TEXT types.
This was my initial mistake and it put me on the wrong path
easy solution and I’m sure, I did it in other widgets before, but this time, I was to silly to get this working.
If you’re not familiar with it, it’s hard to extract useful values from your linked documentation, especially if you don’t know whether it’s even the right documentation.
Maybe there will be more user-friendly documentation soon.
Im still missing a solution for the dropdown field with predetermined values. This could be a good tool to provide the community with easy-to-manipulate widgets.
Whilst you are trying, do you mind just adding them to a post (maybe the first post of this thread) as a collection of what you have seen in the widgets and arrange them in a summery quick glance or cheat sheet style? Then someone can update docs easier if someone has started the work in the forum. There is also a solutions area of the forum which may be better place to publish a work in progress collection for others to post and contribute to your collection if you do not mind collating them.
I certainly am missing a few text contexts (IP address, email, stuff like that) which may be more relevant to a UI widget than a rule template but a lot of the contexts are not going to be relevant.
A search in the latest docs shows that the search index at least still thinks this page is there. But it leads to a 404 instead of the actual page. But I was able to find it by browsing through the links. Configuration Descriptions | openHAB
I’m not sure why search is broken.
I think the best way forward would be to link to this reference from the “Building Custom Widgets” page (maybe elsewhere?) along with perhaps a short description on how to map the table to YAML.
The YAML follows the same hierarchy as shown in the XML examples on that page so it’s not too hard.
Note, at least for rule templates, filtering doesn’t appear to work. If you only want Group Items and set a filter to do that, you’ll still get a list of all Items.