Understand counter statistics: state, sum, and delta
mainWhen working with counter-type entities (like energy meters), three key values are used to track data:
| Term | Description | Example |
|---|---|---|
state | The actual meter reading at the end of the period. | 6913.045 kWh |
sum | The cumulative value since the counter was created. | 6913.045 kWh (if started at 0) |
delta | The change in the sum during the previous hour. | 0.751 kWh |
Key Relationship: The difference between state and sum is the initial value of the counter when it was first connected to Home Assistant. This difference remains constant as long as the counter is functioning correctly.