

Those built-in widgets revolve around several libraries: To help you define usable pages, there are a number of built-in widgets that you can use - most of which will be in layout pages. The system & standard libraries, default widgets (standalone, list items & cells), adding widgets from the model class and styleare standard Vue.js attributes and can be used to either alter the CSS classes or add inline styling to the component.visibleTo: this accepts an array of strings like role:administrator, role:user, or user:, allowing the widget to be only visible to specific users or those with a certain role (as mentioned previously in part I, this is not a security feature).Įxample: visibleTo:.This powerful feature, combined with expressions (see below), allows you to dynamically show widgets or even entire sections (if you use it on layout widgets containing other widgets), depending on the state of your items Įxample: visible: =items.TV_Powered.state = 'ON' & items.TV_Input.state = 'HDMI1' visible: you can specify a false boolean to this option to hide the widget.Share the widgets with others in the forum.īesides, there are several options that virtually all widgets in layout pages, map pages and plan pages accept, all of which are not currently available in the config sheet:.To quickly and efficiently duplicate similar widgets with only a few differences, it is always way easier to copy/paste the relevant YAML in the editor.See below to learn more about expressions.

Sometimes you’ll want to use an expression to configure the property, but the UI will get in your way - for instance, it will display an item picker while your intention is to set the prop value to be =em1.Sometimes it will be indicated somewhere when configuring the widget, or in the openHAB documentation itself, on the other hand some options won’t be available for use (for instance, because they expect a callback function and you cannot define those in the widget’s config) or need some transformation.

This means that as a rule, these underlying concepts will usually be passed the key/values of the (openHAB) widget component’s config so that more parameters can be accepted than those which are documented in the widget’s definition.
