Cannot get InfluxDB 2.0 to work

I have InfluxDB 2.0 running on a separate VM outside of my Hass.io Docker and I’m trying connect my HA to it. I followed the instructions here but keep getting a configuration error.

Invalid config for [influxdb]: [api_version] is an invalid option for [influxdb]. Check: influxdb->influxdb->api_version. (See /config/configuration.yaml, line 650). 

My config (configuration.yaml) :

influxdb:
  api_version: 2
  ssl: false
  host: 10.0.1.11
  port: 9999
  token: ##valid token inserted here##
  organization: ##valid org ID inserted here##
  bucket: homeassistant
  tags:
    source: HA
  tags_attributes:
    - friendly_name
  default_measurement: units
  include:
    entities:
      - weather.smartweather
      - sensor.wupws_weather_1d
      - sensor.wupws_weather_1n
      - sensor.wupws_weather_2d

EDIT : Solved ! Updated to 0.114 from 0.111 fixed this.

Are you using a recent version of HA ?
The option to select api_version might not exist in the version you are running.
GV

Is this code part of configuration.yaml or in a separate file? If it’s in a separate file, you need to remove the “influxdb:” at the top of the file because you are already referencing it in configuration.yaml.

I’m on 0.111.2 but let me update it to the latest see if I still have this problem.

EDIT : Updating to the latest version worked !! Thanks for the suggestion.

Thanks, I should have mentioned, this is in my configuration.yaml, not a separate file.

Are you using InfluxDB 2.0 and Grafana 8.0? I have the same setting, in this setup I’m missing the query builder in Grafana.

Yes, I’m using InfluxDB 2.0 and Grafana 8.0.