



The placeholder %unit% can be placed anywhere in the state description. The special placeholder %unit% will then be replaced by the actual unit symbol. In case the state description should display the unit the binding delivers or the framework calculates through locale-based conversion the pattern will look like this: The state description defines two decimal places for the value and the fix unit ☏. Without the dimension information the NumberItem only will receive updates of type DecimalType without a unit and any conversion. In the example the NumberItem is specified to bind to Channels which offer values from the dimension Temperature. Number:Temperature temperature "Outside " If the parsing failed the locale-based default conversion takes place. The framework assumes that the unit to parse is always the last token in the state description. The unit given in the state description is parsed and then used for conversion (if necessary). In addition to the automated conversion the NumberItem linked to a Channel delivering QuantityTypes can be configured to always have state updates converted to a specific unit. # NumberItem linked to QuantityType Channel This conversion will convert the given QuantityType into a default unit for the specific dimension of the type.

The metric system with SI units is used for the rest of the world. This is the imperial system for the United States (locale US) and Liberia (language tag "en-LR"). The framework tries to convert a QuantityType to the default unit of the configured locale. The default conversion the framework will use is locale-based: The framework is then able to convert the values to either ☏ or Kelvin according to the configuration of the system. This way the framework and/or the user is able to convert the quantified value to other matching units:Ī weather binding which reads temperature values in ☌ would use the QuantityType to indicate the unit as ☌. # QuantityTypeīindings use the QuantityType to post updates of sensor data with a quantifying unit. To express measured values in a scientific correct unit the framework supports units of measurement.īy using quantified decimal values in state updates and commands, the framework is able to automatically convert values to a desired unit which may be defined by the system locale or on a per-use-basis. Advanced Functionality and Administrative Tasks.
