individual subscriptions: resubscribe, show, some system commands

This commit is contained in:
MichaelDvP
2021-03-23 15:28:33 +01:00
parent 1dae9f8beb
commit a83d3a12fb
5 changed files with 53 additions and 30 deletions

View File

@@ -91,7 +91,7 @@ void Command::add(const uint8_t device_type, const __FlashStringHelper * cmd, cm
return;
}
cmdfunctions_.emplace_back(device_type, cmd, cb, nullptr);
cmdfunctions_.emplace_back(device_type, flag, cmd, cb, nullptr);
// see if we need to subscribe
if (Mqtt::enabled()) {
@@ -106,7 +106,7 @@ void Command::add_with_json(const uint8_t device_type, const __FlashStringHelper
return;
}
cmdfunctions_.emplace_back(device_type, cmd, nullptr, cb); // add command
cmdfunctions_.emplace_back(device_type, MqttSubFlag::FLAG_NOSUB, cmd, nullptr, cb); // add command
}
// see if a command exists for that device type