How to design the dialog task to respond based on previous message context

In the below scenario, how to design the dialog task

User : What is the temperature of NewYork?
Bot : 27 degree celusis
User : What about California ?
Bot :

You can drive such conversations with the bot using sub-intents that can be configured to re-use the entity values from the main dialog task and process subsequent requests from user to identify the new entity values.

Ex: If we have 2 entities in the main dialog for temperature and location.
You can create sub-intent and tag them with ML utterances to identify the task to be executed with new entity provided in the user utterance.