Influxdb and mqtt sensors in 2022.9?

I’m using the modern syntax for mqtt sensors and I have sensors under the mqtt block

mqtt: 
  sensor: !include_dir_merge_list mqtt/sensors

In other examples, there is a platform: influxdb under the sensor block but I can’t figure out if that is required or not.

I have this block for the influxdb configuration

influxdb:
  api_version: 2
  host: localhost
  token: <valid token>
  organization: ha
  bucket: HomeAssistant
  tags:
    source: HA
  tags_attributes: friendly_name    
  default_measurement: state

The influxdb documentation mentions that you need to configure the history component of the integration but there is nothing clear about it.

I am not getting any data in my influxdb database. My bucket is completely empty. There is nothing related to influxdb in the logs. Any suggestions? What am I missing?