diff --git a/include/devices.h b/include/devices.h index 9c1e90c..ae027c9 100644 --- a/include/devices.h +++ b/include/devices.h @@ -49,7 +49,7 @@ namespace Devices { Number* displayTimerMqtt = Builder::instance(new Number{ "Timer duration", "timer_duration", [](const char* msg) { auto value = String{ msg }.toInt(); - Display::Timer::timer = value; + timer = value; displayTimerMqtt->updateState(value); } }).withMin(0).withMax(90).withStep(5).restoreStateFromCommand().build(); @@ -58,10 +58,10 @@ namespace Devices { Switch* timerMqtt = Builder::instance(new Switch{"Timer", "timer", [](const char* msg) { if (strcmp("ON", msg) == 0) { - Display::Timer::start(); + Display::tTimer.restart(); timerMqtt->updateState(true); } else { - Display::Timer::stop(); + Display::tTimer.disable(); timerMqtt->updateState(false); } } @@ -77,10 +77,9 @@ namespace Devices { .addSecondary( Builder