Site updated at 2016-08-22 08:21:42 UTC

This commit is contained in:
Travis CI 2016-08-22 08:21:43 +00:00
parent f9d65cbe57
commit 4acb07bf8e
559 changed files with 18878 additions and 21688 deletions

View file

@ -89,7 +89,7 @@
<hr class="divider">
<p>After loading, the bootstrapper will call <code>setup(hass, config)</code> method on the component to initialize it.</p>
<p>After loading, the bootstrapper will call <code class="highlighter-rouge">setup(hass, config)</code> method on the component to initialize it.</p>
<h3><a class="title-link" name="hass-the-home-assistant-instance" href="#hass-the-home-assistant-instance"></a> hass: the Home Assistant instance</h3>
@ -104,19 +104,19 @@
</thead>
<tbody>
<tr>
<td><code>hass.config</code></td>
<td><code class="highlighter-rouge">hass.config</code></td>
<td>This is the core configuration of Home Assistant exposing location, temperature preferences and config directory path. <a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/core.py#L687">Details</a></td>
</tr>
<tr>
<td><code>hass.states</code></td>
<td><code class="highlighter-rouge">hass.states</code></td>
<td>This is the StateMachine. It allows you to set states and track when they are changed. <a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/core.py#L434">See available methods</a>.</td>
</tr>
<tr>
<td><code>hass.bus</code></td>
<td><code class="highlighter-rouge">hass.bus</code></td>
<td>This is the EventBus. It allows you to trigger and listen for events.<br /><a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/core.py#L229">See available methods</a>.</td>
</tr>
<tr>
<td><code>hass.services</code></td>
<td><code class="highlighter-rouge">hass.services</code></td>
<td>This is the ServiceRegistry. It allows you to register services.<br /><a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/core.py#L568">See available methods</a>.</td>
</tr>
</tbody>
@ -124,18 +124,16 @@
<h3><a class="title-link" name="config-user-given-configuration" href="#config-user-given-configuration"></a> config: User given configuration.</h3>
<p>The <code>config</code> parameter is a dictionary containing the user supplied configuration. The keys of the dictionary are the component names and the value is another dictionary with the component configuration.</p>
<p>The <code class="highlighter-rouge">config</code> parameter is a dictionary containing the user supplied configuration. The keys of the dictionary are the component names and the value is another dictionary with the component configuration.</p>
<p>If your configuration file contains the following lines:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">example</span>:
<span class="key">host</span>: <span class="string"><span class="content">paulusschoutsen.nl</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">example</span><span class="pi">:</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">paulusschoutsen.nl</span>
</code></pre>
</div>
<p>Then in the setup method of your component you will be able to refer to <code>config['example']['host']</code> to get the value <code>paulusschoutsen.nl</code>.</p>
<p>Then in the setup method of your component you will be able to refer to <code class="highlighter-rouge">config['example']['host']</code> to get the value <code class="highlighter-rouge">paulusschoutsen.nl</code>.</p>
</article>