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

@ -39,31 +39,36 @@ binary_sensor:
required: true
type: map
keys:
friendly_name:
description: Name to use in the frontend.
required: false
type: string
entity_id:
description: Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update its state.
required: false
type: string, list
device_class:
description: The type/class of the sensor to set the icon in the frontend.
required: false
type: device_class
default: None
value_template:
description: Defines a template to set the state of the sensor.
sensor_name:
description: The slug of the sensor.
required: true
type: template
delay_on:
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`.
required: false
type: time
delay_off:
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`.
required: false
type: time
type: map
keys:
friendly_name:
description: Name to use in the frontend.
required: false
type: string
entity_id:
description: Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update its state.
required: false
type: string, list
device_class:
description: The type/class of the sensor to set the icon in the frontend.
required: false
type: device_class
default: None
value_template:
description: Defines a template to set the state of the sensor.
required: true
type: template
delay_on:
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`.
required: false
type: time
delay_off:
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`.
required: false
type: time
{% endconfiguration %}
## {% linkable_title Considerations %}

View File

@ -46,7 +46,7 @@ sensor:
default: Luftdaten Sensor
type: string
resource:
description: The URL of the API endpoint. Usually this has not to be changed.
description: The URL of the API endpoint. Usually this has not to be changed.
required: false
default: https://api.luftdaten.info/v1/sensor/
type: string
@ -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).