Skip to content

Converting unit_of_measurement variable to optional, to be consisten with other sensors #1344

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

Merged
merged 1 commit into from
Oct 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions source/_components/sensor.influxdb.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ha_category: Sensor
ha_release: 0.32
---

The `InfluxDB` sensor allows you to use values from an [InfluxDB](https://influxdb.com/) database to populate a sensor state.
The `InfluxDB` sensor allows you to use values from an [InfluxDB](https://influxdb.com/) database to populate a sensor state. This can be use to present statistic about home_assistant sensors if used with the `influxdb` history component. It can also be used with an external data source.

To configure this sensor, you need to define the sensor connection variables and a list of queries to your `configuration.yaml` file. A sensor will be created for each query:

Expand All @@ -22,7 +22,6 @@ sensor:
- platform: influxdb
queries:
- name: mean value of foo
unit_of_measurement: °C
where: '"name" = ''foo'''
measurement: '"°C"'
```
Expand All @@ -38,7 +37,7 @@ Configuration variables for the server:
- **verify_ssl** (*Optional*): Verify SSL certificate for `https` request. Defaults to `false`.
- **queries** array (*Required*): List of queries
- **name** (*Required*): The name of the sensor.
- **unit_of_measurement** (*Required*): Defines the units of measurement of the sensor.
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
- **measurement** (*Required*): Defines the measurement name in InfluxDB (the from clause of the query).
- **where** (*Required*): Defines the data selection clause (the where clause of the query).
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
Expand Down