Site updated at 2017-05-15 08:16:38 UTC
This commit is contained in:
parent
8fbd710b09
commit
6de1b6590b
27 changed files with 63 additions and 38 deletions
|
@ -136,6 +136,18 @@
|
|||
<span class="no">- sensor.wardrobe_co_status</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3><a class="title-link" name="change-the-icon" href="#change-the-icon"></a> Change the icon</h3>
|
||||
<p>This example shows how to change the icon based on the day/night cycle.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">sensor</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">template</span>
|
||||
<span class="s">sensors</span><span class="pi">:</span>
|
||||
<span class="s">day_night</span><span class="pi">:</span>
|
||||
<span class="s">friendly_name</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Day/Night'</span>
|
||||
<span class="s">value_template</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{%</span><span class="nv"> </span><span class="s">if</span><span class="nv"> </span><span class="s">is_state("sun.sun",</span><span class="nv"> </span><span class="s">"above_horizon")</span><span class="nv"> </span><span class="s">%}Day{%</span><span class="nv"> </span><span class="s">else</span><span class="nv"> </span><span class="s">%}Night{%</span><span class="nv"> </span><span class="s">endif</span><span class="nv"> </span><span class="s">%}'</span>
|
||||
<span class="s">icon_template</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{%</span><span class="nv"> </span><span class="s">if</span><span class="nv"> </span><span class="s">is_state("sun.sun",</span><span class="nv"> </span><span class="s">"above_horizon")</span><span class="nv"> </span><span class="s">%}mdi:weather-sunny{%</span><span class="nv"> </span><span class="s">else</span><span class="nv"> </span><span class="s">%}mdi:weather-night{%</span><span class="nv"> </span><span class="s">endif</span><span class="nv"> </span><span class="s">%}'</span>
|
||||
|
||||
</code></pre>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
<p>Configuration variables:</p>
|
||||
<ul>
|
||||
<li><strong>host</strong> (<em>Required</em>): IP address of the Osram Lightify bridge, eg. <code class="highlighter-rouge">192.168.1.50</code>.</li>
|
||||
<li><strong>allow_lightify_groups</strong> (<em>Optional</em>): (true/false) Edit this to stop homeassistant from importing the lightify groups.</li>
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
|
|
|
@ -148,6 +148,18 @@
|
|||
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">switch.skylight_close</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3><a class="title-link" name="change-the-icon" href="#change-the-icon"></a> Change the icon</h3>
|
||||
<p>This example shows how to change the icon based on the day/night cycle.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">sensor</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">template</span>
|
||||
<span class="s">sensors</span><span class="pi">:</span>
|
||||
<span class="s">day_night</span><span class="pi">:</span>
|
||||
<span class="s">friendly_name</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Day/Night'</span>
|
||||
<span class="s">value_template</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{%</span><span class="nv"> </span><span class="s">if</span><span class="nv"> </span><span class="s">is_state("sun.sun",</span><span class="nv"> </span><span class="s">"above_horizon")</span><span class="nv"> </span><span class="s">%}Day{%</span><span class="nv"> </span><span class="s">else</span><span class="nv"> </span><span class="s">%}Night{%</span><span class="nv"> </span><span class="s">endif</span><span class="nv"> </span><span class="s">%}'</span>
|
||||
<span class="s">icon_template</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{%</span><span class="nv"> </span><span class="s">if</span><span class="nv"> </span><span class="s">is_state("sun.sun",</span><span class="nv"> </span><span class="s">"above_horizon")</span><span class="nv"> </span><span class="s">%}mdi:weather-sunny{%</span><span class="nv"> </span><span class="s">else</span><span class="nv"> </span><span class="s">%}mdi:weather-night{%</span><span class="nv"> </span><span class="s">endif</span><span class="nv"> </span><span class="s">%}'</span>
|
||||
|
||||
</code></pre>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue