Skip to content

Commit

Permalink
Added stop_timer as settings parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
k-janssens committed Sep 22, 2022
1 parent 088f291 commit acac092
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3029,6 +3029,19 @@ void StartwebServer(void) {
write_settings();
}

if(request->hasParam("stop_timer")) {
String stop_timer = request->getParam("stop_timer")->value();

if(stop_timer.toInt() >= 0 && stop_timer.toInt() <= 60) {
StopTime = stop_timer.toInt();
doc["stop_timer"] = true;
write_settings();
} else {
doc["stop_timer"] = false;
}

}

if(Mode == MODE_NORMAL) {
if(request->hasParam("override_current")) {
String current = request->getParam("override_current")->value();
Expand Down
8 changes: 8 additions & 0 deletions SmartEVSE-3/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ paths:
required: false
schema:
type: integer
- in: query
name: stop_timer
description: |-
Set the stop timer to be used when there isn't sufficient solar power. Value must be >=0 and <= 60. Using 0 will disable the stop timer.
required: false
allowEmptyValue: true
schema:
type: integer
- in: query
name: disable_override_current
description: |-
Expand Down

0 comments on commit acac092

Please sign in to comment.