I believe you did the meter_power.charged correct btw:
By default the meter_power capability will be used to determine the energy charged by the EV charger.
{
“name”: { “en”: “Home Battery” },
“class”: “battery”,
“capabilities”: [
“measure_power”,
“measure_battery”,
“meter_power.charged”,
“meter_power.discharged”,
“target_power”,
“target_power_mode”
],
“capabilitiesOptions”: {
“meter_power.charged”: {
“title”: { “en”: “Charged Energy” }
},
“meter_power.discharged”: {
“title”: { “en”: “Discharged Energy” }
},
“target_power”: {
“min”: -5000,
“max”: 5000
}
},
“energy”: {
“homeBattery”: true,
“meterPowerImportedCapability”: “meter_power.charged”,
“meterPowerExportedCapability”: “meter_power.discharged”
}
}
Since currently we dont have discharge yet, what you did matches their expectation. THe behavior in my dashboards are also fine.
The meter_power capability (or meter_power sub capabilities) represents energy in kilowatt-hours (kWh) and can be used in two ways:
- Cumulative energy
Tracks the total amount of energy consumed or generated over time, with values that continuously and only increase. It is typically reset only when the device is reset or reinstalled. Example : A smart meter displaying 12,345 kWh since installation.
- Non-cumulative
Represents energy used or generated during a specific time interval, without accumulating past values. Example : Energy consumed in the last 24 hours, or current battery state of charge in kWh.
In the following sections, when meter_power is referenced, it always refers to cumulative energy, unless explicitly stated otherwise. In this context, meter_power tracks the total energy consumed or generated over time, measured in kilowatt-hours (kWh).
Energy calculates energy consumption over a given period by analyzing the difference in the meter_power value over time. If the values are periodically reset to zero or decrease unexpectedly, it may lead to data loss or invalid interpretations.
FYI, I found out you can add your own modes to the target_power_mode so you can merge it into the other Peblar modes.