Class ElementSpec
A custom sensor or node stat a profile contributes to the dashboard.
public sealed record ElementSpec : IEquatable<ElementSpec>
- Inheritance
-
ElementSpec
- Implements
- Inherited Members
Constructors
ElementSpec(string, string, string, Viz)
A custom sensor or node stat a profile contributes to the dashboard.
public ElementSpec(string Key, string Unit, string Label, Viz Viz)
Parameters
KeystringThe stable, language-neutral element key, such as
water_turbidity.UnitstringThe canonical unit name, such as
ntu,ph, orcount.LabelstringA human-readable fallback label, shown when no localized label applies.
VizVizThe graphic this element is drawn with.
Properties
Band
Gets the safe band as [low, high] in the element's unit.
public float[]? Band { get; init; }
Property Value
- float[]
Key
The stable, language-neutral element key, such as water_turbidity.
public string Key { get; init; }
Property Value
Label
A human-readable fallback label, shown when no localized label applies.
public string Label { get; init; }
Property Value
Labels
Gets the per-locale labels, keyed by locale tag.
public IReadOnlyDictionary<string, string>? Labels { get; init; }
Property Value
Scope
Gets the link kinds whose groups this element is offered on, such as ["mesh"];
null means every group.
[JsonConverter(typeof(ScopeConverter))]
public IReadOnlyList<string>? Scope { get; init; }
Property Value
Span
Gets whether the element's tile spans two columns.
public bool Span { get; init; }
Property Value
Stat
Gets whether this is a node or network stat rather than a measurement of the world.
public bool Stat { get; init; }
Property Value
State
Gets a starting discrete state code, such as state.closed, for a non-numeric element.
public string? State { get; init; }
Property Value
Unit
The canonical unit name, such as ntu, ph, or count.
public string Unit { get; init; }
Property Value
Value
Gets a starting numeric value for the add-sensor dialog.
public float? Value { get; init; }
Property Value
Viz
The graphic this element is drawn with.
public Viz Viz { get; init; }