mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
don't show handlers if there arn't any
This commit is contained in:
@@ -981,7 +981,10 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & json
|
|||||||
obj["type"] = emsdevice->device_type_name();
|
obj["type"] = emsdevice->device_type_name();
|
||||||
obj["name"] = emsdevice->to_string();
|
obj["name"] = emsdevice->to_string();
|
||||||
char result[200];
|
char result[200];
|
||||||
obj["handlers"] = emsdevice->show_telegram_handlers(result);
|
(void)emsdevice->show_telegram_handlers(result);
|
||||||
|
if (result[0] != '\0') {
|
||||||
|
obj["handlers"] = result; // don't show hanlders if there aren't any
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user