Widgets & Panes

The ControlPane renders operator widgets bound to live entity fields. Each widget reads values from the data bus and emits commands back through the ControlBus.

Widget Types

enum ControlWidgetType auto-generated

Variant Fields Description
Button
Toggle
Slider
Gauge
Dial
StatusLight
ValueDisplay
Separator

WidgetSpec

Rust WidgetSpec
auto-generated
pub struct WidgetSpec {
    pub id: String,
    pub widget_type: ControlWidgetType,
    pub label: String,
    pub value_binding: Option<String>,
    pub column_span: usize,
    pub min: Option<f64>,
    pub max: Option<f64>,
    pub unit: Option<String>,
    pub accent: WidgetAccent,
    pub thresholds: Vec<ThresholdSpec>,
    /// Legacy string command (backward compatible).
    pub command: Option<String>,
    /// Legacy off-command for Toggle widgets.
    pub off_command: Option<String>,
    pub default_value: Option<f64>,
    /// Structured bus command that routes through the ControlBus for reliability.
    pub bus_command: Option<BusCommandSpec>,
    /// Separate bus command for when a Toggle turns off.
    pub bus_off_command: Option<BusCommandSpec>,
}

BusCommandSpec

Rust BusCommandSpec
auto-generated
/// Declarative bus command attached to a widget in the config YAML.
pub struct BusCommandSpec {
    pub target: BusTargetSpec,
    pub fields: Vec<BusFieldSpec>,
    /// Override label shown in the audit log (defaults to the widget label).
    pub label: Option<String>,
}

Rendering Details

  • Gauge renders a 240° arc via GPU-accelerated vector paths. Threshold colors map to arc segments (green → amber → red).
  • Slider emits commands only on drag stop (mouse-up / touch-end) to avoid flooding the bus with intermediate values.
  • Button captures a TAI timestamp on every press, recorded in the audit log alongside the issued command.
  • StatusLight evaluates thresholds in order; the first matching threshold sets the indicator color.

YAML Configuration

Text
widgets:
  - id: setpoint-slider
    type: Slider
    label: "Temperature Setpoint"
    value_binding: "setpoint_temp"
    min: 16.0
    max: 30.0
    unit: "°C"
    column_span: 2
    command:
      target: { entity: "hvac-unit-1" }
      fields:
        - field: setpoint_temp
          value: "$widget_value"
      label: "Adjust setpoint"

  - id: compressor-gauge
    type: Gauge
    label: "Compressor Load"
    value_binding: "compressor_throttle"
    min: 0.0
    max: 100.0
    unit: "%"
    thresholds:
      - value: 80.0
        color: amber
      - value: 95.0
        color: red

Questions?

Reach out for help with integration, deployment, or custom domain codecs.