Skip to content

Commit ddf86d3

Browse files
committed
Fix restart
1 parent 8fa8a63 commit ddf86d3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/EasyMqtt.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ class EasyMqtt : public MqttEntry {
4747
get("system")["uptime"] << []() {
4848
return String(millis() / 1000);
4949
};
50-
get("system")["reset"] >> [](String value) {
51-
ESP.reset();
50+
get("system")["restart"] >> [this](String value) {
51+
if(value == "restart") {
52+
debug("Restart");
53+
ESP.restart();
54+
}
5255
};
5356
}
5457

src/MqttConfigEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class MqttConfigEntry : public MqttEntry {
88
public:
9-
EasyConfig(char* key, char* value) {
9+
MqttConfigEntry(char* key, char* value) {
1010
>> [](String value){
1111
setValue(value);
1212
// ToDo: Call store();

0 commit comments

Comments
 (0)