Metrics
Every value metrd records or works out is a metric.
A metric is one value over time, such as an array's solar power or the grid's import today. Graphs, displays, and Home Assistant all work with metrics. They're listed under Metrics in the dashboard.
Every metric has a kind, such as Solar power or Grid import, and a unit. The kind decides where a metric can be used. A display's Solar section only takes solar power, for example.
Where metrics come from
| Source | What it is |
|---|---|
| Integration | Read from a device. These are created for you the first time a device reports a value. |
| Group | Several metrics added together or averaged |
| Calculated | A formula over other metrics |
| Power flow | How much power goes from one place to another, worked out by power flows |
| Period total | How much of a metric there was today, this week, and so on. See Energy and cost totals. |
| Cost | A power or energy metric priced with a tariff |
| Standing charge | A tariff's daily standing charge, spread across the day |
Group metrics
Use Add group metric to combine metrics of the same unit type. Two solar arrays can become one solar figure, for example. Power and energy are added up. Things like state of charge are averaged.
Device groups get group metrics of their own, made and kept up to date for you.
Calculated metrics
Use Add calculated metric to work a value out from other metrics. Give each input a letter, then write a formula with them, such as A - B or max(A, 0). You can use +, -, *, /, brackets, numbers, min, max and abs.
Pick the kind the result should have. Its unit type must match the formula's result, so a formula over power metrics gives a power metric. A calculated house load works anywhere a house load does.
A preview shows the result over the last day while you edit.
Changing and deleting
Open a metric to see its last 24 hours, rename it, or edit a group or calculated metric. A metric that another metric uses as an input can't be deleted until you remove it from that metric.