add stubs for commands handled elsewhere so they dont error

This commit is contained in:
Tester23
2024-10-20 10:31:15 +02:00
parent b2b4d2b338
commit c3a518998b
3 changed files with 18 additions and 5 deletions

View File

@ -363,7 +363,7 @@ static commandResult_t cmnd_MqttClient(const void * context, const char *cmd, co
CFG_SetMQTTClientId(Tokenizer_GetArg(0));
return CMD_RES_OK;
}
static commandResult_t cmnd_State(const void * context, const char *cmd, const char *args, int cmdFlags) {
static commandResult_t cmnd_stub(const void * context, const char *cmd, const char *args, int cmdFlags) {
return CMD_RES_OK;
}
@ -429,10 +429,23 @@ int taslike_commands_init(){
//cmddetail:"fn":"cmnd_MqttClient","file":"cmnds/cmd_tasmota.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("MqttClient", cmnd_MqttClient, NULL);
// those are stubs, they are handled elsewhere so we can have Tasmota style replies
//cmddetail:{"name":"State","args":"NULL",
//cmddetail:"descr":"NULL",
//cmddetail:"fn":"cmnd_State","file":"cmnds/cmd_tasmota.c","requires":"",
//cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("State", cmnd_State, NULL);
CMD_RegisterCommand("State", cmnd_stub, NULL);
//cmddetail:{"name":"Sensor","args":"NULL",
//cmddetail:"descr":"NULL",
//cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("Sensor", cmnd_stub, NULL);
//cmddetail:{"name":"Status","args":"NULL",
//cmddetail:"descr":"NULL",
//cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("Status", cmnd_stub, NULL);
return 0;
}