use common restart button
This commit is contained in:
parent
67313b22c8
commit
4e12ca89eb
@ -114,13 +114,8 @@ struct EasyHomeSwitch : Switch {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Command* commands[] = {
|
Command* commands[] = {
|
||||||
Builder<Button>::instance(new Button{"Restart", "restart",
|
HaESP::restartButton()
|
||||||
[](const char* msg) {
|
|
||||||
if (strcmp("PRESS", msg) == 0) ESP.restart();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.asDevice(gatewayDevice)
|
.asDevice(gatewayDevice)
|
||||||
.withIcon("mdi:restart")
|
|
||||||
.addPreconfigured(HaESP::heapStats)
|
.addPreconfigured(HaESP::heapStats)
|
||||||
.addPreconfigured(HaESP::restartInfo)
|
.addPreconfigured(HaESP::restartInfo)
|
||||||
.build(),
|
.build(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user