on Layout page there should be a way to show as label the result of an expression, but I cannot find the right sintax (ie.e based on item state I’d like to show the string)
Hardware: raspberry pi 5
OS: RaspberrypiOS latest
openHAB version: 5.1
Please post configurations (thing config):
There’s a whole doc page on expressions for MainUI widgets:
But, for your initial expression the most relevant points are:
Expressions are string literals beginning with the symbol = and everything after it is evaluated using a syntax very similar to JavaScript.
and
items is a dynamic key/value dictionary allowing you to retrieve the state of any Item: The result of items.Item1 will be an object like { state: '23', displayState: '23 °C', numericState: 23, unit: '°C', type: 'Decimal' } (displayState, numericState and unit may be omitted). You can therefore use items.Item1.state to use the current state of Item1 in your expression, and if the state changes, the expression will be reevaluated.