get and set config via mqtt messages
This commit is contained in:
@@ -69,7 +69,7 @@ void loop()
|
||||
if (commands::commandMap.contains(cmd))
|
||||
{ // call command from command map in this same thread (the MQTT thread)
|
||||
LOG_INFO("Executing command", cmd.c_str());
|
||||
auto answer = std::move(commands::commandMap.at(cmd)(devices, params));
|
||||
auto answer = std::move(commands::commandMap.at(cmd)(devices, params)); // here the magic happens
|
||||
if (answer.isNull())
|
||||
return;
|
||||
mqtt.publish(conf.m_mqttPublish["answers"], answer);
|
||||
|
||||
Reference in New Issue
Block a user