InfluxDB sensor - need help with syntax

Hi,
I’ve InfluxDB add-on running and I’m trying to create a sensor that will be populated with data extracted from InfluxDB. This query runs successfully in the web console of InfluxDB add-on:

SELECT mean("value") AS "mean_value" FROM "homeassistant_influxDB"."autogen"."A" WHERE time > now() - 30d AND time < :upperDashboardTime: AND "entity_id"='dishwasher_current' GROUP BY time(:interval:) FILL(null)

Here is my configuration of the sensor and I’ve tried many variations of it but cannot seem to get it right as the state (under Developers Tools) always shows up as “unknown”:

sensor:
  - platform: influxdb
    api_version: 1
    host: !secret influx_db_host
    port: !secret influx_db_port
    username: !secret influx_username
    password: !secret influx_password
    scan_interval: 3600
    queries:
      - name: test_influx
        unit_of_measurement: A
        database: homeassistant_influxDB
        measurement: 'A'
        where: 'time > now() - 30d AND "entity_id"="dishwasher_current"'
        group_function: last
        field: value

If anyone can spot a mistake or missing details, please point me in the right direction.
Thanks,