power-meter
Multi-metric electrical meter.
Multi-metric electrical meter. One slice can carry any combination of instantaneous power (W), cumulative energy (kWh), voltage (V), and current (A) — all fields optional so a single-metric source (HA sensor with device_class: power) populates only what it has and aggregators (energy dashboards, billing exports) compose across providers without needing one cap per metric.
Trade-off acknowledged: a HomeKit export that wants to surface "power" and "energy" as separate services has to crack open the slice and emit two characteristics from one cap. Worth it to avoid exploding the cap catalog with power-w / energy-kwh / voltage-v / current-a quartets that always travel together in real-world devices.
At a glance
| Capability | power-meter |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | sensor, switch, light, fan, climate, humidifier, water-heater, media-player, washer, dryer, dishwasher, vacuum, lawn-mower, pet-feeder, workload |
| Device settings | Yes: its settings section on the device page is built from this capability's methods. |
| Source | packages/types/src/capabilities/power-meter.cap.ts |
Methods
This capability declares no methods.
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
power | number | no | Instantaneous TOTAL power draw of the device (watts), when known. |
deliveredPower | number | no | Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to its ports. When power is known it already includes this (the own draw is netPowerOf); a device that reports no total (a UniFi switch) carries this field alone. |
energy | number | no | Cumulative energy in kilowatt-hours since the meter was reset. |
voltage | number | no | Voltage (volts). |
current | number | no | Current in amperes. |
apparentPower | number | no | Apparent power in volt-amperes. |
powerFactor | number | no | Power factor (0..1) if reported. |
lastFetchedAt | number | yes | Ms epoch when the slice was last updated. |