New configuration variable style

This commit is contained in:
Fabian Affolter 2017-11-04 23:11:05 +01:00
parent 8d752574c6
commit 1090740531
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336
3 changed files with 74 additions and 49 deletions

View File

@ -38,6 +38,11 @@ binary_sensor:
description: List of your sensors.
required: true
type: map
keys:
sensor_name:
description: The slug of the sensor.
required: true
type: map
keys:
friendly_name:
description: Name to use in the frontend.

View File

@ -62,19 +62,11 @@ sensor:
keys:
P1:
description: Show the particle sensors (particles 10 microns and below).
required: false
type: string
P2:
description: Show the particle sensors (particles 2.5 microns and below).
required: false
type: string
temperature:
description: Display the temperature from a weather sensor.
required: false
type: string
humidity:
description: Display the humidity from a weather sensor.
required: false
type: string
{% endconfiguration %}

View File

@ -29,21 +29,49 @@ sensor:
- weather
```
Configuration variables:
- **api_key** (*Required*): Your API key for http://openweathermap.org/.
- **name** (*Optional*): Additional name for the sensors. Default to platform name.
- **forecast** (*Optional*): Enables the forecast. The default is to display the current conditions.
- **language** (*Optional*): The language in which you want text results to be returned. It's a two-characters string, eg. `en`, `es`, `ru`, `it`, etc. Defaults to English.
- **monitored_conditions** array (*Required*): Conditions to display in the frontend.
- **weather**: A human-readable text summary.
- **temperature**: The current temperature.
- **wind_speed**: The wind speed.
- **wind_bearing**: The wind bearing.
- **humidity**: The relative humidity.
- **pressure**: The sea-level air pressure in millibars.
- **clouds**: Description about cloud coverage.
- **rain**: The rain volume.
- **snow**: The snow volume
{% configuration %}
apk_key:
description: Your API key for http://openweathermap.org/.
required: true
type: string
name:
description: Additional name for the sensors. Default to platform name.
required: false
default: OWM
type: string
forecast:
description: Enables the forecast. The default is to display the current conditions.
required: false
default: false
type: string
language:
description: The language in which you want text results to be returned. It's a two-characters string, eg. `en`, `es`, `ru`, `it`, etc.
required: false
default: en
type: string
monitored_conditions:
description: Conditions to display in the frontend.
required: true
type: list
keys:
weather:
description: A human-readable text summary.
temperature:
description: The current temperature.
wind_speed:
description: The wind speed.
wind_bearing:
description: The wind bearing.
humidity:
description: The relative humidity.
pressure:
description: The sea-level air pressure in millibars.
clouds:
description: Description about cloud coverage.
rain:
description: The rain volume.
snow:
description: The snow volume.
{% endconfiguration %}
Details about the API are available in the [OpenWeatherMap documentation](http://openweathermap.org/api).