pyisyox.schema.uom module

Unit-of-measure table for IoX 6.

Each editor range carries a uom id (string) that resolves into this table. category_id is a coarse semantic grouping (temperature, volume, electric_current, etc.) used by HA’s platform classifier to decide between sensor device classes.

This table is the canonical UOM source for pyisyox; it covers every UOM UDI publishes plus the friendly short-symbol form HA typically wants for unit_of_measurement. name holds the short symbol (e.g. "°C", "%", "A"); description is UDI’s verbose label.

Sources merged: UDI’s nucore-ai src/nucore/uom.py for description + category, plus the legacy pyisyox UOM_FRIENDLY_NAME table for short-symbol display strings (the values HA users see). Where the two disagreed on the symbol form, UOM_FRIENDLY_NAME won — it was hand-curated to match HA’s conventions.

class UOMEntry(id, name, description='', category_id=None)[source]

Bases: object

A unit-of-measure entry.

Variables:
  • id (str) – UOM identifier as it appears in profile responses.

  • name (str) – Short display name (suitable for sensor unit_of_measurement).

  • description (str) – Free-text description.

  • category_id (str | None) – Coarse semantic category (see module docstring).

Parameters:
  • id (str)

  • name (str)

  • description (str)

  • category_id (str | None)

id: str
name: str
description: str
category_id: str | None
get_uom(uom_id)[source]

Look up a UOM by id; returns the unknown entry if unrecognised.

Parameters:

uom_id (str)

Return type:

UOMEntry