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 required: true
type: map type: map
keys: keys:
friendly_name: sensor_name:
description: Name to use in the frontend. description: The slug of the sensor.
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 required: true
type: template type: map
delay_on: keys:
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`. friendly_name:
required: false description: Name to use in the frontend.
type: time required: false
delay_off: type: string
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`. entity_id:
required: false 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.
type: time 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 %} {% endconfiguration %}
## {% linkable_title Considerations %} ## {% linkable_title Considerations %}

View File

@ -46,7 +46,7 @@ sensor:
default: Luftdaten Sensor default: Luftdaten Sensor
type: string type: string
resource: 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 required: false
default: https://api.luftdaten.info/v1/sensor/ default: https://api.luftdaten.info/v1/sensor/
type: string type: string
@ -62,19 +62,11 @@ sensor:
keys: keys:
P1: P1:
description: Show the particle sensors (particles 10 microns and below). description: Show the particle sensors (particles 10 microns and below).
required: false
type: string
P2: P2:
description: Show the particle sensors (particles 2.5 microns and below). description: Show the particle sensors (particles 2.5 microns and below).
required: false
type: string
temperature: temperature:
description: Display the temperature from a weather sensor. description: Display the temperature from a weather sensor.
required: false
type: string
humidity: humidity:
description: Display the humidity from a weather sensor. description: Display the humidity from a weather sensor.
required: false
type: string
{% endconfiguration %} {% endconfiguration %}

View File

@ -29,21 +29,49 @@ sensor:
- weather - weather
``` ```
Configuration variables: {% configuration %}
apk_key:
- **api_key** (*Required*): Your API key for http://openweathermap.org/. description: Your API key for http://openweathermap.org/.
- **name** (*Optional*): Additional name for the sensors. Default to platform name. required: true
- **forecast** (*Optional*): Enables the forecast. The default is to display the current conditions. type: string
- **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. name:
- **monitored_conditions** array (*Required*): Conditions to display in the frontend. description: Additional name for the sensors. Default to platform name.
- **weather**: A human-readable text summary. required: false
- **temperature**: The current temperature. default: OWM
- **wind_speed**: The wind speed. type: string
- **wind_bearing**: The wind bearing. forecast:
- **humidity**: The relative humidity. description: Enables the forecast. The default is to display the current conditions.
- **pressure**: The sea-level air pressure in millibars. required: false
- **clouds**: Description about cloud coverage. default: false
- **rain**: The rain volume. type: string
- **snow**: The snow volume 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). Details about the API are available in the [OpenWeatherMap documentation](http://openweathermap.org/api).