NSPanel Documentation ◆ Icon overview GitHub Deutsch

Page Thermo (classic) – configuration in the admin

The classic thermostat page cardThermo shows one thermostat: on the left the actual temperature and the humidity, in the middle the set point with the − and + keys, below it a bar with eight slots for mode icons and status displays. It is created in the tab PageConfig, page type Thermostat (classic).

Only the Headline, the Thermostat channel, the Unit and the limits of the set temperature are configured. Everything else is derived by the adapter from the states it finds below the channel – the editor says so itself: "Classic thermostat page: one alias channel with the role thermostat or airCondition. The adapter reads the actual, set and humidity states below the channel; the buttons at the bottom are not configured but derived from the states it finds there (mode, boost, window open, ...)."

In the adapter the admin page runs through the same code as a cardThermo page from a script (ConfigManager.getPageThermo); with the same entries the result on the panel is identical.

Contents:

1. Creating the page

  1. Open the instance settings → tab PageConfig.
  2. In the list Pages on the left click the PLUS, choose the type Thermostat (classic) and enter a Unique ID (the page name the navigation refers to).
  3. The new page appears in the list; the editor opens on the right. A new page has no channel yet – without a channel the adapter builds an empty card and writes the reason as an error into the log of the instance.

The fields Panel Filter and Page Type above the list only filter what the list shows.

Editor of the classic thermostat page

2. cardThermo or cardThermo2

Both cards control heating and air conditioning, they differ in scope:

cardThermo (classic) cardThermo2
Data sources per page exactly one up to eight
Own slots (page items) none in the admin – the eight slots are filled by the adapter alone own page items per heat circuit, in addition to the generated buttons
airCondition with SET and SET2 shows two set points side by side on one card becomes two heat circuits (heating and cooling) with one set point each
Mode icons only from the MODE state of an airCondition channel; with the role thermostat there are none own mode display with freely chosen mode texts
Icon, color and unit of the value lines not configurable adjustable per line
Paging automatic as soon as more than eight slots come together – not adjustable three paging modes in the page details
Option Values in tenths (tab Global Settings) without effect applies to the limits of the set temperature

In short: cardThermo is the quick card for one thermostat whose alias brings along many states (window, party, vacation, error …), and the only card that shows two set points of an airCondition channel side by side. Whoever needs several heat circuits, own buttons or an adjustable appearance takes cardThermo2.

3. The fields of the editor

Field Meaning
Unique ID Page name; read-only, fixed once the page exists. On the start page the note names the id main.
Headline Header line of the page on the panel. Hint text: Empty = unique ID of the page.
Thermostat channel (role thermostat or airCondition) Alias channel, device or folder with common.role thermostat or airCondition. The object tree behind … shows only objects with these roles; an ID typed in by hand is checked by the editor when the field is left. If it matches, Role: … appears below it, otherwise a warning: The object … was not found or The channel … has the role "…" – expected thermostat or airCondition. Which states the adapter looks for below the channel is in section 5 and in the alias table.
Unit Text behind the temperatures (e.g. °C). Hint text: Empty = unit of the set temperature state – that applies to the big number, the line of the actual temperature then stays without a unit (see Pitfalls). The humidity always shows %.
Set temperature with Minimum temperature, Maximum temperature, Step Limits and step of the set point, see section 4.

The labels of the value lines on the panel are fixed: Temperature above the actual temperature, Humidity above the humidity. The actual temperature shows one decimal place, the humidity none.

Start page (main), Hidden, Screensaver behavior and the navigation targets are on the right in the column Navigation/Panel – described under PageConfig and page details. Paging settings do not appear there for this card; they belong to the menu, Thermo2 and media pages only.

4. Minimum, maximum, step

The three values are stored exactly as the script would have them – so that a page taken over keeps its numbers. Which unit they have is decided by the adapter from the maximum; the hint text below the fields says the same:

The option Values in tenths in the tab Global Settings concerns cardThermo2 only, not this page – its hint text says so explicitly.

5. What the adapter builds from the states

Below the headline nothing is configured. The adapter looks below the channel for common.role and common.type (see the alias table) and builds the values and the bar from them. Only the set point SET is required; without it the build of the page stops with an error in the log.

Which states are looked for at all depends on the role of the channel:

Role Evaluated
thermostat SET (level.temperature, required), ACTUAL (value.temperature, SET as a substitute), HUMIDITY (value.humidity) · bar: POWER (switch.power), BOOST (switch.mode.boost / switch.boost), WINDOWOPEN (sensor.window), PARTY (switch.mode.party), MAINTAIN (indicator.maintenance), UNREACH (indicator.maintenance.unreach), LOWBAT (indicator.maintenance.lowbat), ERROR (indicator.error), VACATION (state with exactly this name), WORKING (indicator.working)
airCondition SET and SET2 (both level.temperature, both have to carry exactly these names), ACTUAL, HUMIDITY · bar: MODE (value.mode.airconditioner), POWER (switch), BOOST, MAINTAIN, UNREACH, ERROR

Not evaluated are MODE and MODESET with the role thermostat as well as USERICON, SPEED, SWING and SWING2; WINDOWOPEN, PARTY, LOWBAT, VACATION and WORKING are known to the role thermostat only.

Switchable are only those slots whose state may be written: the mode icons, POWER, BOOST and PARTY. WINDOWOPEN, MAINTAIN, UNREACH, LOWBAT, ERROR, VACATION and WORKING are pure displays – pressing them does nothing.

The following pictures show the four typical results.

Thermostat: one set point

Thermostat

Role thermostat. On the left Temperature (ACTUAL) and – if a HUMIDITY state is present – Humidity; in the middle the set point SET with the − and + keys. The bar at the bottom is filled by the optional states named above, one slot per state found. The auto / manual buttons of the picture come from the original script: for this role the adapter does not look for states AUTOMATIC, MANUAL or OFF and therefore never generates those buttons. A MODE state does not become icons with thermostat either.

Air conditioner: mode icons

Air conditioner

Role airCondition with a MODE state. The adapter derives the icons from common.states of that state; the entries have to be the English keywords, and both shapes of common.states work:

If the MODE state is of type string, the slot writes the keyword itself in both cases. Recognised, in this order, are: OFF (power-off), AUTO (alpha-a-circle), COOL (snowflake), HEAT (fire), ECO (alpha-e-circle-outline), FAN_ONLY (fan), DRY (water-percent). Keywords missing from common.states get no icon; translated texts ({"0": "off", "1": "automatic"}) are not recognised by the adapter – then no mode icon appears at all. Without any common.states the built-in list OFF, AUTO, COOL, HEAT, ECO, FAN_ONLY, DRY applies (position = value) with all seven icons. Only AUTO has an icon of its own for the inactive state (the outlined A); the other modes show the same icon in the off colour when inactive. After them follow the slots of the remaining states (POWER, BOOST, MAINTAIN, UNREACH, ERROR).

Air conditioner: two set points

Air conditioner with two set points

Role airCondition with SET and SET2: the panel shows two set points side by side, e.g. heating and cooling. Both states have to be named exactly SET and SET2, otherwise the adapter does not find them. The bar below as in the picture before.

Heat pump: four modes

Heat pump

Role airCondition whose MODE state lists only OFF, AUTO, COOL and HEAT in common.states – accordingly exactly four icons appear.

6. Eight slots and the paging arrow

The bar at the bottom has exactly eight slots. The adapter fills them in this order:

  1. the mode icons of an airCondition channel (OFF, AUTO, COOL, HEAT, ECO, FAN_ONLY, DRY),
  2. POWER, BOOST, WINDOWOPEN, PARTY, MAINTAIN, UNREACH, LOWBAT, ERROR, VACATION, WORKING – each only if the state is present.

It follows that:

Eight slots: seven buttons and the paging arrow

The picture shows a complete thermostat alias: on/off, boost, window open (red, because it is open), party, maintenance, unreachable (red, because it is unreachable right now), battery (green, because it is full) — and on the eighth place the paging arrow; the second page shows the remaining three (ERROR, VACATION, WORKING).

7. Saving, panel assignment, navigation

8. Take-over from the script

The migration turns a cardThermo page of the script into an entry of this page type. Taken over are: heading → Headline, items[0].id → Thermostat channel, items[0].unit → Unit, minValue/maxValue/stepValue → the three numbers (unchanged, see section 4).

Styling the panel showed before is lost in the process – the admin has no equivalent for this card:

The page is skipped – and thus left in the script – only when the admin entry would build a different page: no item, items[0] without id (or a navigation or native item), a unit that is not text or is empty, a minValue/maxValue/stepValue that is not a number, or a field this page does not have (the paging fields, for instance).

Pitfalls


Source of this page: doc/en/cardThermo.md · Project on GitHub

  Back to top