What templates are for
Device templates are useful when you want many devices to behave consistently. They help your team keep setup, firmware, dashboard widgets, automations, and monitoring aligned around the same device definition.When to use templates
Use device templates when:- You sell or operate many devices with the same board or model.
- Devices should expose the same entity keys, units, icons, and value types.
- You want a clear contract between firmware, dashboard, automations, and monitoring.
- You need reusable firmware OTA rules for devices using the same template.
- You want device setup to be more consistent across a workspace.
Example uses
You can use device templates for:- Temperature or cold-chain sensors that always report temperature, humidity, battery, and signal quality.
- Smart relays that expose relay state, active mode, and power usage.
- Vending or paid-service devices that share the same control and usage data.
- Environmental monitoring devices with the same sensor layout across many locations.
- Field devices that should receive firmware updates only during a selected maintenance window.
Template list
The Device Templates page shows the workspace template registry. From this page, you can:- Search templates by name.
- Filter templates by whether they are assigned to devices.
- Open template details.
- Edit template identity.
- Delete a template when it is safe to remove.
- See the current version, revision, assigned device count, and last updated time.
What a template contains
The entity contract is the most important part. It tells firmware developers and dashboard users which values a device should send or receive.
Entities
Templates can include custom entities for telemetry, state, controls, or device-specific values. Each custom entity can define:- Name and key.
- Entity type.
- Value type, such as boolean, enum, number, or string.
- GPIO pin and pin type when relevant.
- Default value, range, unit, prefix, suffix, and icon.
- Description for the people configuring or maintaining the device.
Keep entity keys stable. Renaming an entity key can affect dashboards, automations, firmware examples, and monitoring that already use the old key.
Versions and edits
Creating a template starts with version 1. Editing the hardware or entity contract publishes a new immutable template version. This helps existing device definitions stay understandable over time. Simple identity edits, such as name or description, can be changed from the template list. Contract changes should be treated as a new version.Device assignment
Templates are optional for devices. Creating a template does not automatically change existing devices. A device only uses a template after it is explicitly assigned. The template list can show assigned and unassigned templates, so you can quickly see which templates are already in use.Firmware OTA policy
A template can include one firmware OTA policy. Supported options include:- Latest compatible or fixed firmware selection.
- Schedule: immediate, user-defined datetime, or maintenance window (days, time window, timezone).
- Rollout strategy:
all_at_once,canary, orstaged_expand. - Canary percent and expand stage percents for staged rollouts.
max_devices_per_batch(wave size per execution step).approval_requiredfor owner sign-off before OTA triggers.- Safety gates:
min_success_percent,min_observation_minutes,max_failure_percent,retry_limit.
Before publishing
Before creating or publishing a template version:- Confirm the board and model are correct.
- Review selected protocols.
- Check each custom entity key and value type.
- Make sure enum options, numeric ranges, and default values are valid.
- Review firmware OTA policy timing if a policy is attached.
- Use a clear description so other workspace members know when to use the template.