Skip to content

Commit 1090740

Browse files
committed
New configuration variable style
1 parent 8d75257 commit 1090740

File tree

3 files changed

+74
-49
lines changed

3 files changed

+74
-49
lines changed

source/_components/binary_sensor.template.markdown

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,36 @@ binary_sensor:
3939
required: true
4040
type: map
4141
keys:
42-
friendly_name:
43-
description: Name to use in the frontend.
44-
required: false
45-
type: string
46-
entity_id:
47-
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.
48-
required: false
49-
type: string, list
50-
device_class:
51-
description: The type/class of the sensor to set the icon in the frontend.
52-
required: false
53-
type: device_class
54-
default: None
55-
value_template:
56-
description: Defines a template to set the state of the sensor.
42+
sensor_name:
43+
description: The slug of the sensor.
5744
required: true
58-
type: template
59-
delay_on:
60-
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`.
61-
required: false
62-
type: time
63-
delay_off:
64-
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`.
65-
required: false
66-
type: time
45+
type: map
46+
keys:
47+
friendly_name:
48+
description: Name to use in the frontend.
49+
required: false
50+
type: string
51+
entity_id:
52+
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.
53+
required: false
54+
type: string, list
55+
device_class:
56+
description: The type/class of the sensor to set the icon in the frontend.
57+
required: false
58+
type: device_class
59+
default: None
60+
value_template:
61+
description: Defines a template to set the state of the sensor.
62+
required: true
63+
type: template
64+
delay_on:
65+
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`.
66+
required: false
67+
type: time
68+
delay_off:
69+
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`.
70+
required: false
71+
type: time
6772
{% endconfiguration %}
6873

6974
## {% linkable_title Considerations %}

source/_components/sensor.luftdaten.markdown

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ sensor:
4646
default: Luftdaten Sensor
4747
type: string
4848
resource:
49-
description: The URL of the API endpoint. Usually this has not to be changed.
49+
description: The URL of the API endpoint. Usually this has not to be changed.
5050
required: false
5151
default: https://api.luftdaten.info/v1/sensor/
5252
type: string
@@ -62,19 +62,11 @@ sensor:
6262
keys:
6363
P1:
6464
description: Show the particle sensors (particles 10 microns and below).
65-
required: false
66-
type: string
6765
P2:
6866
description: Show the particle sensors (particles 2.5 microns and below).
69-
required: false
70-
type: string
7167
temperature:
7268
description: Display the temperature from a weather sensor.
73-
required: false
74-
type: string
7569
humidity:
7670
description: Display the humidity from a weather sensor.
77-
required: false
78-
type: string
7971
{% endconfiguration %}
8072

source/_components/sensor.openweathermap.markdown

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,49 @@ sensor:
2929
- weather
3030
```
3131
32-
Configuration variables:
33-
34-
- **api_key** (*Required*): Your API key for http://openweathermap.org/.
35-
- **name** (*Optional*): Additional name for the sensors. Default to platform name.
36-
- **forecast** (*Optional*): Enables the forecast. The default is to display the current conditions.
37-
- **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.
38-
- **monitored_conditions** array (*Required*): Conditions to display in the frontend.
39-
- **weather**: A human-readable text summary.
40-
- **temperature**: The current temperature.
41-
- **wind_speed**: The wind speed.
42-
- **wind_bearing**: The wind bearing.
43-
- **humidity**: The relative humidity.
44-
- **pressure**: The sea-level air pressure in millibars.
45-
- **clouds**: Description about cloud coverage.
46-
- **rain**: The rain volume.
47-
- **snow**: The snow volume
32+
{% configuration %}
33+
apk_key:
34+
description: Your API key for http://openweathermap.org/.
35+
required: true
36+
type: string
37+
name:
38+
description: Additional name for the sensors. Default to platform name.
39+
required: false
40+
default: OWM
41+
type: string
42+
forecast:
43+
description: Enables the forecast. The default is to display the current conditions.
44+
required: false
45+
default: false
46+
type: string
47+
language:
48+
description: The language in which you want text results to be returned. It's a two-characters string, eg. `en`, `es`, `ru`, `it`, etc.
49+
required: false
50+
default: en
51+
type: string
52+
monitored_conditions:
53+
description: Conditions to display in the frontend.
54+
required: true
55+
type: list
56+
keys:
57+
weather:
58+
description: A human-readable text summary.
59+
temperature:
60+
description: The current temperature.
61+
wind_speed:
62+
description: The wind speed.
63+
wind_bearing:
64+
description: The wind bearing.
65+
humidity:
66+
description: The relative humidity.
67+
pressure:
68+
description: The sea-level air pressure in millibars.
69+
clouds:
70+
description: Description about cloud coverage.
71+
rain:
72+
description: The rain volume.
73+
snow:
74+
description: The snow volume.
75+
{% endconfiguration %}
4876

4977
Details about the API are available in the [OpenWeatherMap documentation](http://openweathermap.org/api).

0 commit comments

Comments
 (0)