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,24 +89,20 @@
<hr class="divider">
<p>Home Assistant allows components and platforms to specify their dependencies and requirements using the variables <code>DEPENDENCIES</code> and <code>REQUIREMENTS</code>. Both are lists that contain strings.</p>
<p>Home Assistant allows components and platforms to specify their dependencies and requirements using the variables <code class="highlighter-rouge">DEPENDENCIES</code> and <code class="highlighter-rouge">REQUIREMENTS</code>. Both are lists that contain strings.</p>
<p>Dependencies are other Home Assistant components that should be setup before the platform is loaded. An example is the MQTT sensor component, which requires an active connection to an MQTT broker. If Home Assistant is unable to load and setup the MQTT component, it will not setup the MQTT sensor component.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>DEPENDENCIES = [<span class="string"><span class="delimiter">'</span><span class="content">mqtt</span><span class="delimiter">'</span></span>]
</pre></div>
</div>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="n">DEPENDENCIES</span> <span class="o">=</span> <span class="p">[</span><span class="s">'mqtt'</span><span class="p">]</span>
</code></pre>
</div>
<p>Requirements are Python libraries that you would normally install using <code>pip</code>. If Home Assistant is unable to install the requirements or verify it is installed, the component will fail to load.</p>
<p>Requirements are Python libraries that you would normally install using <code class="highlighter-rouge">pip</code>. If Home Assistant is unable to install the requirements or verify it is installed, the component will fail to load.</p>
<p>Requirements is a list of strings. Each entry is a pip compatible string. For example, the media player Cast platform depends on the Python package PyChromecast v0.6.12:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>REQUIREMENTS = [<span class="string"><span class="delimiter">'</span><span class="content">pychromecast==0.6.12</span><span class="delimiter">'</span></span>]
</pre></div>
</div>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="n">REQUIREMENTS</span> <span class="o">=</span> <span class="p">[</span><span class="s">'pychromecast==0.6.12'</span><span class="p">]</span>
</code></pre>
</div>