Hi, @chares!
This command belongs to the EnergyMeter
capability.
{
"id": "energyMeter",
"version": 1,
"status": "live",
"name": "Energy Meter",
"attributes": {
"energy": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"Wh",
"kWh",
"mWh",
"kVAh"
],
"default": "kWh"
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"enumCommands": []
}
},
"commands": {
"resetEnergyMeter": {
"arguments": []
}
}
}
So, any device that uses this capability, would have access to the command resetEnergyMeter
. It depends on the device handler (if it has this command included) the actions it performs.
In my DTH, I reset the energy value to zero:
def resetEnergyMeter(){
log.debug "Energy reset"
sendEvent(name: "energy", value: "0", unit:"kWh")
}
This is a sample of how I trigger it using Postman: