قصد الإتيان بالمأمور به إنما يلزمه عند توجه الأمر
Intending the commanded act becomes incumbent when the command becomes applicable.
Intention distinguishes fasting as worship. In the Hanafi treatment of the ordinary current Ramadan fast, intention made within a permitted part of the morning may suffice under specified conditions, based on the relation between the commanded act and the time of intention.
The Shafiʿi position requires intention during the night for an obligatory fast. The two approaches should not be merged into one undifferentiated ruling.
The dispute concerns the relevant time, category of fast, and the implication drawn from the scriptural command, not whether intention matters at all.