You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/developers/website.markdown
+32-10Lines changed: 32 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ To test your changes locally, you need to install **Ruby** and its dependencies
23
23
- Install `bundler`, a dependency manager for Ruby: `$ gem install bundler`
24
24
- In your home-assistant.github.io root directory, run `$ bundle` to install the gems you need.
25
25
26
-
Short cut for Fedora: `$ sudo dnf -y install gcc-c++ ruby ruby-devel rubygem-bundler && bundle`
26
+
Short cut for Fedora: `$ sudo dnf -y install gcc-c++ ruby ruby-devel rubygem-bundler rubygem-json && bundle`
27
27
28
28
Then you can work on the documentation:
29
29
@@ -73,20 +73,42 @@ A couple of points to remember:
73
73
- Document the needed steps to retrieve API keys or access token for the third party service or device if needed.
74
74
- Keep the configuration sample minimal by only adding the `Required` options. Full configuration details with further explanations should go into a seperate section.
75
75
- The description of all the configuration variables should contains information about the used defaults.
76
-
- If you're adding a new component, for the `ha_release` part of the header, just increment off the current release. If the current release is 0.37, make `ha_release` 0.38.
76
+
- If you're adding a new component, for the `ha_release` part of the header, just increment of the current release. If the current release is 0.37, make `ha_release` 0.38. If it's 0.30 or 0.40 please quote it with `" "`.
77
77
78
-
### {% linkable_title Embedding Code %}
78
+
### {% linkable_title Configuration variables %}
79
+
80
+
The ***Configuration Variables*** section must use the {% raw %}`{% configuration %} ... {% endconfiguration %}`{% endraw %} tag.
79
81
80
-
You can use the default markdown syntax to generate syntax highlighted code. For inline code wrap your code in \`. For multi-line, syntax wrap your code as shown below.
81
82
82
83
```text
83
-
{% raw %} ```yaml
84
-
sensor:
85
-
platform: template
86
-
```{% endraw %}
84
+
{% raw %}
85
+
{% configuration %}
86
+
api_key:
87
+
description: The API key to access the service.
88
+
required: true
89
+
type: string
90
+
name:
91
+
description: Name to use in the frontend.
92
+
required: false
93
+
type: string
94
+
{% endconfiguration %}
95
+
{% endraw %}
96
+
```
97
+
98
+
-**`description:`**: That the variable is about.
99
+
-**`required:`**: If the variable is required.
100
+
```text
101
+
required: true #=> Required
102
+
required: false #=> Optional
103
+
required: inclusive #=> Inclusive
104
+
required: exclusive #=> Exclusive
105
+
required: any string here #=> Any string here
87
106
```
107
+
-**`type:`**: The type of the variable. Allowed entries: `string`, `int` or `map`. For multiple possibilities use `[string, int]`. If you use `map` then you need to define `keys:` (see the [`template` sensor](/components/sensor.template/) for an example).
108
+
109
+
### {% linkable_title Embedding Code %}
88
110
89
-
Note that you can replace `yaml` next to \`\`\` with the language that is within the block.
111
+
You can use the [default markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code) to generate syntax highlighted code. For inline code wrap your code in {% raw %}`{% endraw %}.
90
112
91
113
When you're writing code that is to be executed on the terminal, prefix it with `$`.
92
114
@@ -109,7 +131,7 @@ The direct usage of HTML is supported but not recommended. The note boxes are an
109
131
### {% linkable_title Redirects %}
110
132
If you rename or move an existing platform or component, create the redirect. Add the old location of the page to the header of the new one.
0 commit comments