How to expand/upgrade existing builtin widgets?

You don’t need to compile a jar (that would make it far harder to share with other people) or open one up. It can be useful to peak into the source code here which if your using version 2.x of Openhab the code is archived as Version 3.x is being worked on:

How to reuse and extend existing widgets is talked about in the linked post below. Other examples can be found if you search the forum using parts of the code that help ensure only posted examples will get a hit.

I would do a search for <widget-button ng-model= as an example and you should get people who have posted questions on the button widget and given an example…

I did it recently and it was as simple as inserting the widget code, setting any configs to hard coded defaults or creating the config items from scratch in the editor. I am in the middle of making a new button and will look to editing the wiki post which is below.

Examples can be looked at by looking at other widgets people have created as well and uploaded to the gallery or this forum.

1 Like