Skip to content

Devices

DaveL17 edited this page May 2, 2026 · 4 revisions

The Adapters plugin currently supports these device types:

Predefined Scale Adapter

The Predefined Scale Adapter device provides several built-in standard conversions, including: Length, Power, and Temperature. Select the scale type, then choose the native scale (what your source device reports) and the desired scale (what you want the adapter to display). You can also set the decimal precision of the output.

img_predefined_scale_adapter.png

Custom Linear Scale Adapter

The Custom Linear Scale Adapter applies a linear transformation to a numeric sensor state using the formula:

result = (native reading * multiplier) + offset

Set the Multiplier and Offset fields to define the transformation, then use the Format field to control how the result is displayed (Python "new style" format strings, e.g. {0:.2f} °C). Use the Show Result button to preview the output before saving.

img_custom_linear_adapter.png

Custom Formula Adapter - Numeric Result

The Custom Formula Adapter (numeric) lets you write an arbitrary math expression to transform a sensor value. Use x in your expression to refer to the current sensor reading. Expressions are evaluated safely using a restricted Python evaluator. Some examples:

  • (9/5 * x) + 32 — Celsius to Fahrenheit
  • x ** 2 + 3 * x + 4 — polynomial expression
  • 1 if x == 2 else -1 — conditional mapping

Set the Format field to control how the numeric result is displayed. Use the Show Result button to preview the output before saving.

img_custom_formula_adapter_numeric.png

Custom Formula Adapter - String Result

The Custom Formula Adapter (string) is similar to the numeric variant but produces a string state value. This is useful for mapping sensor readings to labels or codes. Use x to refer to the current sensor reading. Some examples:

  • 'up' if x == 1 else 'down'
  • 'up' if x == 1 else 'down' if x == 0 else 'stuck'

Set the Format field to wrap the result string if needed (e.g. code {0}). Use the Show Result button to preview the output before saving.

img_custom_formula_adapter_string.png

Clone this wiki locally