NSPanel Documentation β—† Icon overview GitHub Deutsch

Recurring dialogs in PageConfig

The editors of the individual card types look different, but they all fall back on the same dialogs. Once you have understood how the Pageitem Configuration works, you will recognise it on every page. This page describes those dialogs once and in full; the card type pages link here.

Where the Pageitem Configuration appears: on the menu page in all five variants, on the thermostat page and on the media player page. The editors for alarm, power, chart, QR, trash and page link do not include the dialog β€” there are no free slots there that could hold a page item.

All dialogs share two properties:

Contents:

1. Pageitem Configuration

The Pageitem Configuration of an item with the role select

This is the dialog behind every single slot of a card. It opens with a click on the slot in the editor β€” on a menu page one of the fields, on the thermostat page one of the slots around the set temperature, on the media player page one of the places in the lower bar. Clicking a free slot creates a new page item, clicking an occupied one opens the existing one.

At the top, next to the title Pageitem Configuration, brackets tell you what you are dealing with: the role of the selected channel (dimmer, socket …), plus (unknown role) for a role the adapter does not know, otherwise no channel selected or Object not found in ioBroker.

On the right of the title row sits the small { } button β€” the way to the raw data of the item.

What a page item should show: the three basic cases

Two checkboxes at the head of the dialog decide which kind of element you get:

Checkbox Result
neither Device. The page item operates an ioBroker channel (an alias or a device with a role). The adapter reads from the role which states belong to it and how the slot has to look.
Is a navigation A jump to another page. Instead of a device you pick a Target page. The channel ID may then stay empty β€” the dialog says so explicitly ("Empty ID is allowed (Navigation)").
Custom button (no alias needed) A single state. No channel, no alias: the ID has to point directly at a state with type=boolean. The dialog checks that and writes underneath what it found β€” writeable, read-only, not a boolean state or not a state.

The two checkboxes exclude each other. Ticking one takes the other back β€” a page item is either a navigation or a custom button. (Up to and including 2.2.0 both could be ticked; the adapter then took the navigation.)

Kind of item: Standard or Alexa timer

On pages with page items the Kind of item stands at the very top. Standard (channel, custom button, navigation) is everything this section describes. Alexa timer turns the item into a timer that shows the timers of an Echo device – instead of the channel field there are alexa2 instance and Echo device, plus Show (Timer or Alarm, for an alarm also Which alarm), name, icons and colours. With Is a navigation ticked, Alexa timer is locked. Details under timer popup.

The target page

With Is a navigation ticked, the field Target page appears. It lists the pages this panel knows about β€” the page itself is taken out of the list, main comes first, the rest alphabetically. The field also accepts a freely typed name; handy for a page that does not exist yet, and also the place where a typo goes unnoticed.

At the end of the list stands the entry Screensaver: the slot then shows the screensaver at once, as if the timeout of the panel had run out (see showing the screensaver at once). The same entry stands in the target page of the long press and in the Target page after pressing.

The ioBroker channel and its check marks

The red error mark next to the channel field with its tooltip

The field is called ioBroker Channel, for a custom button ioBroker State instead. The picker behind "…" is filtered by the role, not by the card type: it offers the 30 channel roles the adapter knows states for, and everything below such a channel. Picking a state is shortened to its channel. The complete role table is under Alias Table.

While and after you type, the admin checks the channel and shows the result to the left of the field:

Mark Meaning
Spinner The check is still running. It starts after a short pause while typing, and immediately when the field is left.
Red βœ– Missing required states. The tooltip names them. The role requires states the channel does not have.
Red ⚠ Duplicate states β€” several states of the channel match the same role and the adapter cannot decide. The tooltip names them. The same mark also appears when the button at the foot reads Details…; that case takes precedence, the tooltip then names no states but reads Press the Details... button at the bottom of the dialog.

Below the field there is one more line in plain words: ok (role=…) when everything fits, Object not found in ioBroker, Missing ID, the hint text of the custom button, or β€” when the role matches no known channel role β€” The object's role is not a recognized device type. In that last case the page item cannot be saved usefully; the button at the foot turns into Details….

The gear icon to the right of the field opens the Value Display Configuration for the channel ID itself β€” that is where the unit, prefix, suffix and date format of the shown value live. With a custom button the gear is missing.

Name and dynamic name

Name is the label of the slot on the panel. If the field stays empty, the helper text below shows what happens instead: either Suggestion: … (the name from common.name of the channel) or Default name will be used.

On the thermostat and the media player page the name does not label the slot. There it is only the title of the popup the slot opens; it does not appear below the icon. The dialog says so as helper text under the field: "On this page only the title of the item's popup – not shown below the icon on the panel." See cardThermo2 and cardMedia.

The … button next to it opens the dynamic name β€” a label built from a state. Once one is set up, its preview appears as faint placeholder text in the name field.

Further fields, depending on the card type

These fields only appear where the adapter evaluates them:

Field Visible when Meaning
Heat circuit thermostat page only Assigns the page item to one heat circuit, or all heat circuits β€” then it appears on every one.
Text Size on the three grid variants, on the thermostat and on the media player page β€” not on Entities and Schedule The Nextion font the panel uses to draw the icon or the value of this item (see below).
Use Value Instead of Icon the same five card types, not for a custom button The slot shows the value as text instead of the icon. The adapter only does that when the ACTUAL state is a number, a string or mixed; otherwise the icon stays.
Long press only on the three grid variants, and only for a navigation, a custom button or role=button A second function on the same slot.

Long press

Long press is deliberately kept that narrow: of the pages only the grid pages report a long press to the adapter at all (since the TFT 6.0.9 the indicators of the screensaver do as well), and only items without a popup of their own can make use of it β€” on all others it would collide with the popup. It can either switch a state or jump to a page, never both; that is why the other field disappears as soon as one of them is filled. The state has to be type=boolean and write=true; the object picker only offers such states in the first place. If the group of fields is not visible, the dialog no longer stores an old value along with the item either.

The text/icon size

The selection names the pixel size of each font, e.g. 0 – 24 px (text only), 4 – 80 px bold, 5 – 128 px bold (ASCII only). Behind it sits this table:

ID Size Icons Character set
0 24 px no many special characters
1 32 px yes limited
2 32 px no many special characters
3 48 px yes limited
4 80 px, bold yes limited
5 128 px, bold no ASCII only β€” no Β°, no umlauts

Fields only certain roles evaluate

These fields only appear for a page item with a valid channel ID and a matching role (not for a custom button and not in raw data mode):

Field Roles Meaning
Condition for the value info, slider, motion, door, window, temperature, value.temperature, thermostat, airCondition, humidity, value.humidity β€” for navigation items thermostat, airCondition, temperature, value.temperature, humidity and value.humidity A JavaScript expression over val (the current value), e.g. val && val < 100. The value is only shown instead of the icon while the expression is true, otherwise the icon is shown.
Minimum value / Maximum value volume The range of the volume slider; empty or 0 = panel default.
Second row blind Text of the second row in the shutter popup; empty = none.
Minimum / Maximum brightness dimmer, ct, rgb, rgbSingle, hue The value range of the device that the adapter maps onto the 0–100 slider of the panel; empty or 0 = panel default, then it uses common.min/common.max of the state.
Minimum / Maximum color temperature ct, rgb, rgbSingle, hue The same for the colour temperature slider.
Color mode (colormode) dimmer, ct, rgb, rgbSingle, hue Set: the panel always colours the icon from hue/RGB. Not set: the adapter decides by itself β€” it takes the source whose state was written last (colour temperature or colour).
Target page after pressing button (no navigation item, no custom button) A press switches the button and changes to this page β€” typically to return to the previous page after choosing an option. Like the navigation target page, the field also accepts a freely typed page name.
Use the timer of the screensaver level.timer Checkbox: the item and its popup show the timer of the screensaver of this panel instead of their own states. Help text: The item and its popup show the timer of the screensaver of this panel (time dialog). The states of this channel are not used for it. Locked when the screensaver uses exactly this item as the source of its timer (Not possible: … that would be a circle.). Details under timer popup.

Icon and colour for "true" and "false"

Below that there are two identically built columns: Condition is true (green border) and Condition is false (red border) β€” switched on and off, open and closed. Per column:

That way a page you never styled still looks coherent: every gap is filled by the adapter from role and colour theme.

With the role blind the icon follows the position. If Icon (true) and Icon (false) are both empty, the adapter does not set a fixed name but a placeholder the panel resolves per position: 0–5 % β†’ the icon for "closed", 95–100 % β†’ the one for "open", in between the nearest quarter step (window-shutter-25 / -50 / -75; a tie is rounded up). These three icons are home-made and need HMI/TFT 6.0.2 or newer. As soon as one icon of your own is set, the automatic behaviour is off. The admin keeps showing the end-position icons in the preview β€” panel and preview deliberately differ here.

The buttons at the foot

Button Effect
Color Settings Opens the Color Options β€” a colour gradient across a value range.
Mode list Only for the roles rgbSingle, rgb, ct, hue and select: opens the mode list.

Both turn green as soon as something is configured behind them. So the colour of the button tells you whether it is worth looking inside.

Which button is there is decided by the role. Color Settings only exists for roles whose page item carries a numeric value: blind, thermostat, airCondition, temperature, value.temperature, humidity, value.humidity, info, volume, select, slider, warning, level.timer and level.mode.fan. For the purely switching roles (socket, light, dimmer, ct, rgb, rgbSingle, hue, button, gate, motion, door, window, lock, media) it is missing β€” a colour gradient across a value range makes no sense there. For the light roles the mode list remains, for socket, button and the sensor roles the row stays empty altogether. Only for select are both buttons there. With a custom button and in raw data mode both disappear. Color Settings also only appears once the check of the channel ID is through β€” when the dialog opens and after an ID was typed the button is gone for a moment, with an emptied field or a channel that does not exist it stays away.

At the bottom right there are Cancel and Apply. During the check the right button reads Checking…, with problems detected Details… (orange) β€” see section 8.

2. Raw data of the item

The dialog "Raw data of the item"

The { } button on the right of the title row of the Pageitem Configuration (tooltip "Enter the item as raw data (JSON)") opens the dialog Raw data of the item. It is always there β€” no expert mode needed. Here the page item is entered as raw JSON, for settings that have no interface yet. The item dialog of the screensaver has the same button.

The format: native or script

Two possibilities, each explained by the note box in the dialog:

Format Meaning
native (runtime item) The item as the adapter uses it at runtime (e.g. { "template": …, "dpInit": … }). It is taken over unchanged and has no navigation fields. Corresponds to { native: { … } } in the script.
script (as in the script) The page item exactly as it would stand in a configuration script, e.g. { "id": …, "icon": …, "confirm": … } or { "native": { … }, "navigate": true, "targetPage": … }. The adapter converts it like an item from the script.

The JSON editor

While raw data is active

While raw data is active, the { } button is orange and the whole content of the Pageitem Configuration is replaced by a warning box: "Raw configuration active (format …)", below it the recognisable ID or the template and the sentence "The item is built from the raw data alone, the fields of this dialog are not used." A button Edit raw data leads back into the JSON editor. A raw data item needs no channel ID β€” Apply is therefore possible without a channel, and the role and state checks are skipped.

In the editor such items can be recognised by the label "Raw data" (followed by id, template or dpInit if the configuration contains one of them); they do not show an icon.

This is also where the items end up that the take-over of a configuration script could not map onto fields β€” there they are listed under Taken over as raw data.

If the dialog is missing something the page item would need, the right way is a report to the development team β€” not a permanent rebuild as raw data: https://github.com/ticaki/ioBroker.nspanel-lovelace-ui/issues

3. Picking an object: text field and "…"

The object picker from the page item dialog

Wherever an ioBroker ID is needed, you find the same pair: a text field and next to it the … button.

The value is taken over when you leave the field or press Enter β€” only then does the admin check the ID. If you type and click Apply right away, the click itself triggers the check; the dialog waits for it instead of swallowing the click.

4. Dynamic name

The Dynamic name dialog

The … button at the name field opens the dialog Dynamic name (tooltip "Dynamic name (from a state)"). At the top it says what it does: "Builds the name of the item from a state, optionally with prefix and suffix (text or state ID). Only used while the Name field is empty."

Field Meaning
Value Source / value state ID The state (string or number) whose value becomes the label. If this is not a state but plain text, the text is shown. Below it the detected type appears.
Prefix Text before the value β€” or a state whose value is put in front.
Suffix The same after the value.
Preview Continuously shows the result with the real current value; states in prefix and suffix are resolved. The same preview then appears as faint placeholder text in the name field.
Delete Removes the dynamic name again.

The typed name wins. If there is something in the Name field, the adapter does not evaluate the dynamic name at all β€” it is then not stored either.

There is no unit and no date format here. The adapter does not read them at this place, so the dialog does not show the fields β€” and it clears stored old values when opening and when applying. If you need a unit in the label, put it into the suffix. The unit and date format of the value live behind the gear at the channel field (section 5).

On the thermostat and the media player page the note additionally says that the name is only the popup title there.

5. Value Display Configuration at the channel

The Value Display Configuration dialog at the gear of the channel ID

The gear at the channel field opens the dialog Value Display Configuration (tooltip "Configure channel ID (advanced)"). It describes how the value of the channel appears on the panel. The value source here is the channel itself and read-only β€” it is changed in the channel field.

Field Meaning
Value Source / value state ID The channel ID, for information only. No type is shown here, because a channel has no type.
Unit Is put behind the value. Visible as soon as the value source is a number β€” at the gear also whenever Use Value Instead of Icon is set or the item sits on a grid, thermostat or media player page. Left empty, the adapter uses common.unit of the state.
Prefix Text before the value β€” or a state whose value is put in front.
Suffix The same after the value.
Date Format Its own box, always present here: turns a timestamp into a readable date.
Preview Shows the structure: prefix and suffix are resolved to the current value, the main value stands there as the placeholder <value>.
Delete Clears the whole channel ID, not only the value display β€” see Pitfalls.

Check prefix and suffix from a 1.x configuration

Up to and including 1.7.x the adapter handed prefix and suffix of the item values over the wrong way round to the panel: what was in the prefix appeared behind the value, and vice versa. Version 2.0.0 fixed that. Anyone who deliberately filled them in the wrong way round back then so that it looked right on the panel now sees it wrong after the update β€” and has to swap the two fields back once.

This concerns the fields Prefix and Suffix behind the gear of the channel ID, for every page item configured in the admin. If you filled them the wrong way round at the dynamic name as well, check them there too. If you always filled them as their names say, there is nothing to do. Apart from the changelog this change has not been documented anywhere so far.

The unit is appended to a string as well. The adapter appends it to every value, no matter whether number or text; only the preview in the admin leaves it out for everything that is not a number β€” and because a channel has no type, the preview at the gear never shows it. What really appears on the panel is therefore only shown by the panel.

Date Format

Date Format in detail:

6. Color Options

The Color Options dialog with colour scale and limits

Title Color Options. This turns a numeric value into a colour β€” an icon that runs from blue to red the warmer the reading gets.

Enable Color Settings

The checkbox at the very top switches the colour scale on. Without it, Color Best, Min/Max Value, Best Value, Color Mode and Logarithmic Scaling are disabled, and Apply stores no scale β€” an existing one is removed, and the Color Settings button in the page item dialog is no longer green afterwards. Color Min and Color Max work without the checkbox, they are the colours for false and true. An item without a scale opens the dialog with the checkbox off and the fields at their defaults (0–100, Mixed, no best value); an item with a scale opens it with the checkbox on and its values.

The three colour fields

The three colour fields: Color Min, Color Max and Color Best. Color Min and Color Max are the same values as Color in the columns Condition is false respectively true β€” a change here changes them there as well. As long as no colour of your own is set, it says No color or shows the default colour as a preview, and Set color takes exactly that default as a starting point. Reset hands the colour back to role and colour theme.

Value range, colour mode and scaling

Field Meaning
Min Value / Max Value The value range the colour runs across. Preset to 0 and 100.
Best Value Optional. A point inside the range that gets Color Best β€” the target temperature in the middle, for instance. Without it, the field says no best value.
Color Mode How the colours are computed in between: Mixed (RGB scaling), Hue (HSV scaling), CIE (Color table), Tri-Gradient (Red-Green) and Quad-Gradient (RYGB), the two gradients also anchored. The default is Mixed.
Logarithmic Scaling Linear (none), Log10 to Max or Log10 to Min β€” for readings that span several orders of magnitude.

Below sits a colour preview: a table of values over coloured cells, computed with exactly the same function that later determines the colour on the panel. Minimum, maximum and the best value are printed bold. The preview only appears once more than 1 lies between min and max, and shows at most 30 columns.

The gradient modes ignore the three colour fields. Tri-Gradient and Quad-Gradient (anchored as well) compute with a fixed gradient β€” Tri-Gradient fixed red β†’ yellow β†’ green, with red at both ends and green at the best value. The colour preview shows that correctly; the colour fields have no effect in these modes.

7. Mode list

The Mode list dialog

Title Mode list (inSel_Alias / modeList). This gives a page item a selection list on the panel β€” the light scenes of an RGB lamp, for example. The dialog applies to the roles rgbSingle, rgb, ct, hue and select.

Field Meaning
Selection datapoint (inSel_Alias) The state of type string the selected entry is written to. It is only evaluated for rgbSingle, rgb, ct and hue. For the role select the field is absent: there the adapter uses the channel's SET state, and a note at the top names it.
Modes (one per line) The entries, one per line. Blank lines are discarded.
Take list from datapoint Fills the list from common.states of the state. The button is disabled when no state is selected or it has no common.states β€” the tooltip tells you which of the two.

The check of the selection datapoint

The selection datapoint is checked, and the result appears as a coloured message in the dialog: Datapoint exists, type string, writable (green), or a warning β€” does not exist (the adapter then ignores it), not a state, wrong type, not writable. Applying with a failed check brings up the question Check failed β€” apply anyway?; the way stays open, but not by accident.

Limits the dialog keeps counting

Limits the dialog keeps counting (below the text field it continuously says "n entries, approx. x of 900 characters"):

If the state has its own common.states, the adapter builds the list on the panel directly from them β€” the mode list then only serves as a fallback should the states be missing. The dialog points that out as soon as it finds any. For the role select the weighting is the other way round: without a mode list the adapter builds the list from the common.states, with a mode list the panel shows its entries and writes the index on selection.

8. The check when applying

Apply in the Pageitem Configuration does not close the dialog right away. The admin first sends the page item to the running adapter, which builds a real panel item from it and reports back what it noticed. That gives three cases:

Result What happens
No message The page item is taken over, the dialog closes.
Notes, no error A window Configuration Check lists them. Save takes it over anyway, Cancel leads back into the dialog.
Error Window Configuration Error, only Close. The dialog stays open so you can put it right.

The messages are the English log texts of the adapter, regardless of the language of the admin.

If states were already detected as missing or duplicated, or the role does not fit, the button is not called Apply but Details… and is orange β€” it leads straight into that window. A channel without any states counts as well, unless its role has no mandatory state β€” e.g. level.timer, which is an internal timer when empty.

A missing object is not the same as a missing state. If the channel field says Object not found in ioBroker, the dialog locks every field except the ID, and while the button is labelled Details… it stays grey and does nothing (it is the same button as Apply and needs an existing channel). The only way out of that state is to correct the ID β€” or Cancel.

If the adapter is not running, no check is possible; the dialog then applies without one. So an item passing without complaint means nothing while the adapter is stopped. In the PageConfig tab the editor is greyed out with a stopped adapter anyway (see PageConfig – overview).

Pitfalls


Source of this page: doc/en/PageConfig-Dialoge.md Β· Project on GitHub

  Back to top