diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp index 652bd84..e8d8674 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp @@ -46,6 +46,11 @@ void SmartVariable::setValue(const char *value) this->saveValue(); if (this->iotEnabled) this->publishValue(); + // Call Callbacks + for (auto const &callback : this->valueChangeCallbacks) + { + callback.second(this->value); + } } char *SmartVariable::getValue()