use common restart button

This commit is contained in:
Nicu Hodos 2025-03-27 12:33:15 +01:00
parent 63a25fbfd7
commit c3c7553198

View File

@ -82,12 +82,7 @@ namespace Devices {
}).withIcon("mdi:timer-play-outline").restoreStateFromCommand().build();
auto button =
Builder<Button>::instance(new Button{"Restart", "restart",
[](const char* msg) {
if (strcmp("PRESS", msg) == 0) ESP.restart();
}
})
.withIcon("mdi:restart")
HaESP::restartButton()
.asDevice(espClockDevice)
.addSecondary(
Builder<Button>::instance(new Button{"Display time", "display_time",