Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/Plugin/P077_commands.repl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
","
(Added: 2024-01-16)
Will reset the CF-pulse counter.
N.B. this also clears the kWh counter as it is derived from the CF-pulse counter.
"
4 changes: 2 additions & 2 deletions src/_P077_CSE7766.ino
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ boolean Plugin_077(uint8_t function, struct EventStruct *event, String& string)
const float value = P077_data->getValue(query);
int nrDecimals = 2;

if ((query == P077_query::P077_QUERY_PULSES)) {
if (query == P077_query::P077_QUERY_PULSES) {
nrDecimals = 0;
} else if ((query == P077_query::P077_QUERY_KWH)) {
} else if (query == P077_query::P077_QUERY_KWH) {
nrDecimals = 3;
}

Expand Down
5 changes: 4 additions & 1 deletion src/src/PluginStructs/P077_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,11 @@ bool P077_data_struct::plugin_write(struct EventStruct *event,
changed = true;
} else if (equals(cmd, F("cseclearpulses"))) {
// Clear the pulses count
last_cf_pulses = 0;
cf_pulses = 0;
setOutputValue(event, P077_query::P077_QUERY_KWH, cf_pulses);
setOutputValue(event, P077_query::P077_QUERY_PULSES, cf_pulses);
Scheduler.schedule_task_device_timer(event->TaskIndex, millis() + 10);
success = true;
} else if (equals(cmd, F("csecalibrate"))) { // Set 1 or more calibration values, 0 will skip that value
success = true;
float CalibVolt = 0.0f;
Expand Down