use common restart button

This commit is contained in:
Nicu Hodos 2025-03-27 12:31:02 +01:00
parent 67313b22c8
commit 4e12ca89eb

View File

@ -114,13 +114,8 @@ struct EasyHomeSwitch : Switch {
};
Command* commands[] = {
Builder<Button>::instance(new Button{"Restart", "restart",
[](const char* msg) {
if (strcmp("PRESS", msg) == 0) ESP.restart();
}
})
HaESP::restartButton()
.asDevice(gatewayDevice)
.withIcon("mdi:restart")
.addPreconfigured(HaESP::heapStats)
.addPreconfigured(HaESP::restartInfo)
.build(),