entity-state-to-flight-stats
entity-state-to-flight-stats reduces one numeric field on one entity to its minimum, maximum and average. It emits a single value channel for the StatsSummary widget.
Entity-state records are the JSON records array that hydrate-protobuf-v2 emits with extractionTarget: EntityState. The node reads valueField through JMESPath (a query language for JSON) on every record for the chosen entity and rounds the three results to decimals places. One node instance covers one metric on one entity. Add a second instance for a second metric and bind both to the same widget row.
It is not a time series. Use entity-state-to-chart-data when you need the values over time.
When to use
Use this node when a Next dashboard needs a stat block such as altitude or speed summarised for one entity.
Pipeline position
hydrate-protobuf-v2 (EntityState) -> entity-state-to-flight-stats -> json-merge -> dashboard-v2The node reads the latest output of one parent.
Configuration
Configuration is required. valueField must be a non-empty string.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
entriesPath | string | No | records[*] | JMESPath to the array of time-ordered records. |
entitiesPath | string | No | entity_state.entity | JMESPath from each record to its entity object or array of objects. |
entityNameField | string | No | name | Dotted path from each entity to its name. |
entityName | string | No | "" | Entity to read. When empty, the first entity that yields a value for valueField is used and then locked in. |
valueField | string | Yes | none | JMESPath from the entity to the numeric value. |
decimals | integer | No | 1 | Decimal places for the rounded results. |
realmName | string | No | overview | Realm name. |
channelId | string | No | flight-stats | Channel id. |
channelName | string | No | Flight Stats | Display name. |
groupId | string | No | statssummary | Group id. The group display name equals the group id. |
Output
A data service payload with one value channel.
{
"$heat-dataservice": {
"version": "1.0",
"groups": [{ "id": "statssummary", "name": "statssummary" }],
"realms": [
{
"name": "overview",
"channels": [
{
"id": "flight-stats",
"name": "Flight Stats",
"groupId": "statssummary",
"shape": "value",
"data": { "value": { "min": 120.5, "max": 4692.0, "avg": 2410.3 } }
}
]
}
]
},
"dashboard_users": []
}Bind the channel to a StatsSummary widget and name min, max and avg in statsItems.columns[].
Limitations
- One parent, latest output only.
- Non-numeric values are skipped. The node fails when no numeric value is found for the chosen entity.
- One metric per instance.
Related
- StatsSummary (Next) renders the value channel.
- entity-state-to-chart-data emits the same values over time.
- entity-state-to-stats-summary emits fixed detection counters instead.