InfluxDB Sensor help please

Hi!

I am struggling getting data from my influxdb.

This is what i have:
SELECT mean("value") AS "mean_value" FROM "telegraf"."autogen"."mqtt_consumer" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "topic"='hometop/ht/ch_Tflow_desired' GROUP BY time(:interval:) FILL(null)

This is my code:

  - platform: influxdb
    host: a0d7b954-influxdb
    port: 8086
    username: User
    password: Pass
    queries:
      - name: ch_Tflow_desired
        unit_of_measurement: '"°C"'
        measurement: '"telegraf"."autogen"."mqtt_consumer"'
        where: 'hometop/ht/ch_Tflow_desired'
        database: telegraf
        group_function: last
        field: value

Problem is that I don’t get the sensor.
Is the above code correct? If no, what do I have to change?

Thanks fpr your help!!

Cheers
URBANsUNITED

Hi!

The topic is still open here.
I’ve tried lots of things. This is my latest config:
The query:

SELECT mean("value") AS "mean_value" FROM "telegraf"."autogen"."mqtt_consumer" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "topic"='hometop/ht/ch_Toutside' GROUP BY time(:interval:) FILL(null)

This is my current config:

  - platform: influxdb
    host: a0d7b954-influxdb
    #host: localhost
    port: 8086
    username: "user"
    password: "password"
    queries:
       - name: ch_Toutside
         value_template: '{{ value | round(1) }}'
         unit_of_measurement: °C
         group_function: mean
         where: 'time > now() - 1h AND "topic"="hometop/ht/ch_Toutside"'
         #where: 'time > :dashboardTime: AND time < :upperDashboardTime: AND "topic"="hometop/ht/ch_Toutside"'
         measurement: '"autogen"."mqtt_consumer"'
         field: value
         database: telegraf

Can somebody please help me?

Thanks
URBANsUNITED