MQTT light dimmer with nodeMCU

Me neither, for lack of information on how your LEDs are to be driven and dimmed.
So you best start by posting your existing code, a circuit diagram (no Fritzing wire diagram, they're useless), and describe in more detail what it's doing and what it should do.