add restart button for ESP devices
This commit is contained in:
parent
5d9b0862bf
commit
f33ed5cd75
@ -60,6 +60,15 @@ namespace HaESP {
|
|||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Builder<Button>& restartButton() {
|
||||||
|
return Builder<Button>::instance(new Button{"Restart", "restart",
|
||||||
|
[](const char* msg) {
|
||||||
|
if (strcmp("PRESS", msg) == 0) ESP.restart();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.withIcon("mdi:restart");
|
||||||
|
}
|
||||||
|
|
||||||
void enableSensors() {
|
void enableSensors() {
|
||||||
if (activeSensors.heapStats) tHeap.enable();
|
if (activeSensors.heapStats) tHeap.enable();
|
||||||
if (activeSensors.restartInfo) tRestartInfo.enable();
|
if (activeSensors.restartInfo) tRestartInfo.enable();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user