Skip to content

Add hybrid device type and mutable_variable_regex field#63

Open
FabianoEger wants to merge 3 commits into
mainfrom
feat/hybrid-device-type
Open

Add hybrid device type and mutable_variable_regex field#63
FabianoEger wants to merge 3 commits into
mainfrom
feat/hybrid-device-type

Conversation

@FabianoEger

@FabianoEger FabianoEger commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds the hybrid device storage type and its mutable_variable_regex field to the device create/edit/info types (and the DataStorageType literal), matching backend tago-io/server#1644. Hybrid combines immutable telemetry (chunked, with retention) and editable mutable variables in one device, routed per-variable by the regex. Also corrects a long-standing typo in the immutable device type.

Changes

  • DeviceCreateInfoBasicHybrid / DeviceCreateInfoHybrid added; extended the DeviceCreateInfo alias.
  • mutable_variable_regex added to DeviceEditInfo and DeviceInfo; "hybrid" added to DataStorageType.
  • Documented that mutable_variable_regex rejects match-everything / match-nothing patterns (the server rejects .*, ^$, etc.; use a mutable or immutable device for those cases).
  • Fixed the misspelled immutable type: type: Literal["imutable"] -> Literal["immutable"], and renamed the class DeviceCreateInfoBasicImutable -> DeviceCreateInfoBasicImmutable (with its alias reference and the Sphinx docs). The literal was wrong against the API (which uses immutable), so this corrects broken typing rather than changing working behavior. The class is not part of the package __all__; the public alias DeviceCreateInfoImmutable is unchanged.

Test plan

  • uv run ruff check src clean
  • uv run ruff format clean (changed files)
  • uv run pytest tests/ green (199 passed)

Risk (CIA)

Likelihood: 🟢 Low | Impact: 🟢 Low | Exposure: 🟢 Low
Additive type definitions plus a typo correction to a non-exported class; no runtime behavior change.

Related

  • Backend: tago-io/server#1644
  • Docs: tago-io/docs#108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant