An aerosol-generating system(includes a cartridge, a liquid aerosol-forming substrate, and an aerosol-generating device. The cartridge includes a cartridge housing and a solid aerosol-forming substrate. The aerosol-generating device includes a cavity configured to receive at least a portion of the cartridge, an airflow inlet, and an airflow sensor. The airflow sensor is in fluid communication with the airflow inlet and the cavity). The aerosol-generating device includes a bypass air inlet in fluid communication with the cavity, an electric heater configured to heat the liquid aerosol-forming substrate, a power supply, and a controller. The aerosol-generating system is configured so that the cartridge housing substantially prevents airflow through the bypass air inlet when the cartridge is received within the cavity.