Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config warning InfluxDB sensor #21715

Closed
HugoVonHory opened this issue Mar 6, 2019 · 3 comments
Closed

config warning InfluxDB sensor #21715

HugoVonHory opened this issue Mar 6, 2019 · 3 comments

Comments

@HugoVonHory
Copy link

Home Assistant release with the issue: 0.88.2

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Component/platform: InfluxDB Sensor https://www.home-assistant.io/components/sensor.influxdb/

Description of problem: Configuration validation warning
Your configuration contains extra keys that the platform does not support.
Please remove [database]. (See /config/configuration.yaml, line 132).

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

  - platform: influxdb
    host: 127.0.0.1
    port: 8086
    database: xxxxx
    username: xxxxxx
    password: ********
    queries:
      - name: InfluxDB Database Size
        unit_of_measurement: MB
        value_template: '{{ (value | float / 1024 /1024) | round(1) }}'
        group_function: mean
        measurement: '"monitor"."shard"'
        database: _internal
        where: 'time > now() - 1m AND "database"=''home_assistant'''
        field: diskBytes 

Traceback (if applicable):


Additional information: database is standard key in documentation

@frenck
Copy link
Member

frenck commented Mar 6, 2019

Your YAML for that platform is incorrect. Correct YAML:

  - platform: influxdb
    host: 127.0.0.1
    port: 8086
    username: xxxxxx
    password: ********
    queries:
      - name: InfluxDB Database Size
        unit_of_measurement: MB
        value_template: '{{ (value | float / 1024 /1024) | round(1) }}'
        group_function: mean
        measurement: '"monitor"."shard"'
        database: _internal
        where: 'time > now() - 1m AND "database"=''home_assistant'''
        field: diskBytes 

database is not part of the generic level of the sensor, but part of a query. So I've removed the first database occurrence from your snippet.

I've checked the documentation, and it seems to be correct as well.

@frenck frenck closed this as completed Mar 6, 2019
@SPEC1AL1ST
Copy link

Your YAML for that platform is incorrect. Correct YAML:

  - platform: influxdb
    host: 127.0.0.1
    port: 8086
    username: xxxxxx
    password: ********
    queries:
      - name: InfluxDB Database Size
        unit_of_measurement: MB
        value_template: '{{ (value | float / 1024 /1024) | round(1) }}'
        group_function: mean
        measurement: '"monitor"."shard"'
        database: _internal
        where: 'time > now() - 1m AND "database"=''home_assistant'''
        field: diskBytes 

database is not part of the generic level of the sensor, but part of a query. So I've removed the first database occurrence from your snippet.

I've checked the documentation, and it seems to be correct as well.

This way worked for me, thank you!

@pilot1981
Copy link

pilot1981 commented Oct 28, 2023

it don't working else...there is any breaking changes stopped working it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants