home-assistant.github.io/docs/configuration/templating/index.html
2017-02-23 10:37:03 +00:00

535 lines
No EOL
26 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Templating - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to use the templating feature of Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/docs/configuration/templating/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Templating">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/docs/configuration/templating/">
<meta property="og:type" content="article">
<meta property="og:description" content="Instructions how to use the templating feature of Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Templating">
<meta name="twitter:description" content="Instructions how to use the templating feature of Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li><a href="/getting-started/">Getting started</a></li>
<li><a href="/components/">Components</a></li>
<li><a href="/docs/">Docs</a></li>
<li><a href="/cookbook/">Examples</a></li>
<li><a href="/developers/">Developers</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_docs/configuration/templating.markdown'>Edit this page on GitHub</a></div>
<header>
<h1 class="title indent">
Templating
</h1>
</header>
<hr class="divider">
<p>This is an advanced feature of Home Assistant. Youll need a basic understanding of the following things:</p>
<ul>
<li><a href="/developers/architecture/">Home Assistant architecture</a>, especially states.</li>
<li><a href="/topics/state_object/">State object</a></li>
</ul>
<p>Templating is a powerful feature in Home Assistant that allows the user control over information that is going into and out of the system. It is used for:</p>
<ul>
<li>Formatting outgoing messages in, for example, the <a href="/components/notify/">notify</a> and <a href="/components/alexa/">alexa</a> components.</li>
<li>Process incoming data from sources that provide raw data, like <a href="/components/mqtt/">MQTT</a>, <a href="/components/sensor.rest/">REST sensor</a>, or the <a href="/components/sensor.command_line/">command line sensor</a>.</li>
<li>[Advanced Automation templating]auto-template]</li>
</ul>
<h2><a class="title-link" name="building-templates" href="#building-templates"></a> Building templates</h2>
<p>Templating in Home Assistant is powered by the <a href="http://jinja.pocoo.org/">Jinja2</a> templating engine. This means that we are using their syntax and make some custom Home Assistant variables available to templates during rendering. We will not go over the basics of the syntax, as Jinja2 does a lot better job at this in their <a href="http://jinja.pocoo.org/docs/dev/templates/">Jinja2 documentation</a>.</p>
<p class="note">
The frontend has a template editor developer tool to help develop and debug templates.
</p>
<p>Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">script</span><span class="pi">:</span>
<span class="s">msg_who_is_home</span><span class="pi">:</span>
<span class="s">sequence</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">service</span><span class="pi">:</span> <span class="s">notify.notify</span>
<span class="s">message</span><span class="pi">:</span> <span class="pi">&gt;</span>
<span class="no">{% if is_state('device_tracker.paulus', 'home') %}</span>
<span class="no">Ha, Paulus is home!</span>
<span class="no">{% else %}</span>
<span class="no">Paulus is at {{ states('device_tracker.paulus') }}.</span>
<span class="no">{% endif %}</span>
</code></pre>
</div>
<p><a href="http://jinja.pocoo.org/">Jinja2</a> supports a width variety of operations:</p>
<ul>
<li><a href="http://jinja.pocoo.org/docs/dev/templates/#math">Mathematical operation</a></li>
<li><a href="http://jinja.pocoo.org/docs/dev/templates/#comparisons">Comparisons</a></li>
<li><a href="http://jinja.pocoo.org/docs/dev/templates/#logic">Logic</a></li>
</ul>
<h2><a class="title-link" name="home-assistant-template-extensions" href="#home-assistant-template-extensions"></a> Home Assistant template extensions</h2>
<p>Home Assistant adds extensions to allow templates to access all of the current states:</p>
<ul>
<li>Iterating <code class="highlighter-rouge">states</code> will yield each state sorted alphabetically by entity ID.</li>
<li>Iterating <code class="highlighter-rouge">states.domain</code> will yield each state of that domain sorted alphabetically by entity ID.</li>
<li><code class="highlighter-rouge">states.sensor.temperature</code> returns the state object for <code class="highlighter-rouge">sensor.temperature</code>.</li>
<li><code class="highlighter-rouge">states('device_tracker.paulus')</code> will return the state string (not the object) of the given entity or <code class="highlighter-rouge">unknown</code> if it doesnt exist.</li>
<li><code class="highlighter-rouge">is_state('device_tracker.paulus', 'home')</code> will test if the given entity is specified state.</li>
<li><code class="highlighter-rouge">is_state_attr('device_tracker.paulus', 'battery', 40)</code> will test if the given entity is specified state.</li>
<li><code class="highlighter-rouge">now()</code> will be rendered as current time in your time zone.</li>
<li><code class="highlighter-rouge">utcnow()</code> will be rendered as UTC time.</li>
<li><code class="highlighter-rouge">as_timestamp</code> will convert datetime object or string to UNIX timestamp</li>
<li><code class="highlighter-rouge">distance()</code> will measure the distance in meters between home, entity, coordinates.</li>
<li><code class="highlighter-rouge">closest()</code> will find the closest entity.</li>
<li><code class="highlighter-rouge">relative_time(timestamp)</code> will format the date time as relative time vs now (ie 7 seconds)</li>
<li><code class="highlighter-rouge">float</code> will format the output as float.</li>
<li><code class="highlighter-rouge">strptime(string, format)</code> will parse a string to a datetime based on a <a href="https://docs.python.org/3.4/library/datetime.html#strftime-and-strptime-behavior">format</a>.</li>
<li>Filter <code class="highlighter-rouge">round(x)</code> will convert the input to a number and round it to <code class="highlighter-rouge">x</code> decimals.</li>
<li>Filter <code class="highlighter-rouge">timestamp_local</code> will convert an UNIX timestamp to local time/data.</li>
<li>Filter <code class="highlighter-rouge">timestamp_utc</code> will convert an UNIX timestamp to UTC time/data.</li>
<li>Filter <code class="highlighter-rouge">timestamp_custom(format_string, local_boolean)</code> will convert an UNIX timestamp to a custom format, the use of a local timestamp is default, supporting <a href="https://docs.python.org/3/library/time.html#time.strftime">Python format options</a>.</li>
<li>Filter <code class="highlighter-rouge">max</code> will obtain the larget item in a sequence.</li>
<li>Filter <code class="highlighter-rouge">min</code> will obtain the smallest item in a sequence.</li>
</ul>
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
<h3><a class="title-link" name="states" href="#states"></a> States</h3>
<p>The next two statements result in same value if state exists. The second one will result in an error if state does not exist.</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>{{ states('device_tracker.paulus') }}
{{ states.device_tracker.paulus.state }}
</code></pre>
</div>
<h3><a class="title-link" name="attributes" href="#attributes"></a> Attributes</h3>
<p>Print an attribute if state is defined</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>{% if states.device_tracker.paulus %}
{{ states.device_tracker.paulus.attributes.battery }}
{% else %}
??
{% endif %}
</code></pre>
</div>
<h3><a class="title-link" name="sensor-states" href="#sensor-states"></a> Sensor states</h3>
<p>Print out a list of all the sensor states.</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>{% for state in states.sensor %}
{{ state.entity_id }}={{ state.state }},
{% endfor %}
{% if is_state('device_tracker.paulus', 'home') %}
Ha, Paulus is home!
{% else %}
Paulus is at {{ states('device_tracker.paulus') }}.
{% endif %}
{{ states.sensor.temperature | float + 1 }}
{{ (states.sensor.temperature | float * 10) | round(2) }}
{% if states('sensor.temperature') | float &gt; 20 %}
It is warm!
{%endif %}
{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}
{{ as_timestamp(now()) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
</code></pre>
</div>
<h3><a class="title-link" name="distance-examples" href="#distance-examples"></a> Distance examples</h3>
<p>If only 1 location is passed in, Home Assistant will measure the distance from home.</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>Using Lat Lng coordinates: {{ distance(123.45, 123.45) }}
Using State: {{ distance(states.device_tracker.paulus) }}
These can also be combined in any combination:
{{ distance(123.45, 123.45, 'device_tracker.paulus') }}
{{ distance('device_tracker.anne_therese', 'device_tracker.paulus') }}
</code></pre>
</div>
<h3><a class="title-link" name="closest-examples" href="#closest-examples"></a> Closest examples</h3>
<p>Find entities closest to the Home Assistant location:</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>Query all entities: {{ closest(states) }}
Query all entities of a specific domain: {{ closest('states.device_tracker') }}
Query all entities in group.children: {{ closest('group.children') }}
Query all entities in group.children: {{ closest(states.group.children) }}
</code></pre>
</div>
<p>Find entities closest to a coordinate or another entity. All previous arguments still apply for 2nd argument.</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>Closest to a coordinate: {{ closest(23.456, 23.456, 'group.children') }}
Closest to an entity: {{ closest('zone.school', 'group.children') }}
Closest to an entity: {{ closest(states.zone.school, 'group.children') }}
</code></pre>
</div>
<h3><a class="title-link" name="combined" href="#combined"></a> Combined</h3>
<p>Since closest returns a state, we can combine it with distance too.</p>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>{{ closest(states).name }} is {{ distance(closest(states)) }} meters away.
</code></pre>
</div>
<h2><a class="title-link" name="processing-incoming-data" href="#processing-incoming-data"></a> Processing incoming data</h2>
<p>The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data you care about. This will work only for platforms and components that mentioned support for this in their documentation.</p>
<p>It depends per component or platform, but it is common to be able to define a template using the <code class="highlighter-rouge">value_template</code> configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions:</p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="highlighter-rouge">value</code></td>
<td>The incoming value.</td>
</tr>
<tr>
<td><code class="highlighter-rouge">value_json</code></td>
<td>The incoming value parsed as JSON.</td>
</tr>
</tbody>
</table>
<div class="language-text highlighter-rouge"><pre class="highlight"><code># Incoming value:
{"primes": [2, 3, 5, 7, 11, 13]}
# Extract third prime number
{{ value_json.primes[2] }}
# Format output
{{ "%+.1f" | value_json }}
# Math
{{ value_json | float * 1024 }}
{{ float(value_json) * (2**10) }}
# Timestamps
{{ value_json.tst | timestamp_local }}
{{ value_json.tst | timestamp_utc }}
{{ value_json.tst | timestamp_custom('%Y' True) }}
# Square bracket notation
{{ value_json["001"] }}
</code></pre>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='section'>
<h1 class="title delta">Topics</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/docs/installation/'>Installation </a>
<ul>
<li><a href='/docs/installation/python/'>Python </a></li>
<li><a href='/docs/installation/virtualenv/'>Python Virtual Env </a></li>
<li><a href='/docs/installation/docker/'>Docker </a></li>
<li><a href='/docs/installation/raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/docs/installation/raspberry-pi-all-in-one/'>Raspberrry Pi All-in-One </a></li>
<li><a href='/docs/installation/vagrant/'>Vagrant </a></li>
<li><a href='/docs/installation/synology/'>Synology </a></li>
<li><a href='/docs/installation/updating/'>Updating </a></li>
<li><a href='/docs/installation/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/docs/hassbian/'>Hassbian </a>
<ul>
<li><a href='/docs/hassbian/installation/'>Installation </a></li>
<li><a href='/docs/hassbian/customization/'>Customization </a></li>
<li><a href='/docs/hassbian/common-tasks/'>Common tasks </a></li>
<li><a href='/docs/hassbian/integrations/'>Integrations </a></li>
<li><a href='/docs/hassbian/upgrading/'>Upgrading </a></li>
</ul>
</li>
<li>
<a href='/docs/configuration/'>Configuration </a>
<ul>
<li><a href='/docs/configuration/yaml/'>YAML </a></li>
<li><a href='/docs/configuration/basic/'>Basic information </a></li>
<li><a href='/docs/configuration/devices/'>Setting up devices </a></li>
<li><a href='/docs/configuration/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/docs/configuration/presence-detection/'>Presence Detection </a></li>
<li><a href='/docs/configuration/troubleshooting/'>Troubleshooting </a></li>
<li><a href='/docs/configuration/securing/'>Security Check Points </a></li>
</ul>
</li>
<li>
Advanced Configuration
<ul>
<li><a href='/docs/configuration/remote/'>Remote access </a></li>
<li><a href='/docs/configuration/packages/'>Packages </a></li>
<li><a href='/docs/configuration/splitting_configuration/'>Splitting up the configuration </a></li>
<li><a href='/docs/configuration/secrets/'>Storing Secrets </a></li>
<li><a class='active' href='/docs/configuration/templating/'>Templating </a></li>
<li><a href='/docs/configuration/group_visibility/'>Group Visibility </a></li>
<li><a href='/docs/configuration/events/'>Events </a></li>
<li><a href='/docs/configuration/state_object/'>State Objects </a></li>
<li><a href='/docs/configuration/platform_options/'>Entity component platform options </a></li>
</ul>
</li>
<li>
<a href='/docs/automation/'>Automation </a>
<ul>
<li><a href='/docs/automation/examples/'>Examples </a></li>
<li><a href='/docs/automation/trigger/'>Triggers </a></li>
<li><a href='/docs/automation/condition/'>Conditions </a></li>
<li><a href='/docs/automation/action/'>Actions </a></li>
<li><a href='/docs/automation/templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/docs/frontend/'>Frontend </a>
<ul>
<li><a href='/docs/frontend/mobile/'>Android/iOS Homescreen </a></li>
<li><a href='/docs/frontend/webserver/'>Web server fingerprint </a></li>
<li><a href='/docs/frontend/browsers/'>Browser Compatibility List </a></li>
</ul>
</li>
<li>
<a href='/docs/backend/'>Backend </a>
<ul>
<li><a href='/docs/backend/database/'>Database </a></li>
<li><a href='/docs/backend/updater/'>Updater </a></li>
<li><a href='/developers/api/'>API </a></li>
</ul>
</li>
<li>
<a href='/docs/scripts/'>Scripts </a>
<ul>
<li><a href='/docs/scripts/service-calls/'>Service Calls </a></li>
<li><a href='/docs/scripts/conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/docs/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/docs/z-wave/controllers/'>Controllers </a></li>
<li><a href='/docs/z-wave/settings/'>Modifying Settings </a></li>
<li><a href='/docs/z-wave/device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/docs/mqtt/'>MQTT </a>
<ul>
<li><a href='/docs/mqtt/broker/'>Broker </a></li>
<li><a href='/docs/mqtt/certificate/'>Certificate </a></li>
<li><a href='/docs/mqtt/discovery/'>Discovery </a></li>
<li><a href='/docs/mqtt/service/'>Publish service </a></li>
<li><a href='/docs/mqtt/birth_will/'>Birth and last will messages </a></li>
<li><a href='/docs/mqtt/testing/'>Testing your setup </a></li>
<li><a href='/docs/mqtt/logging/'>Logging </a></li>
<li><a href='/docs/mqtt/processing_json/'>Processing JSON </a></li>
</ul>
</li>
<li>
<a href='/docs/ecosystem/'>Ecosystem </a>
<ul>
<li>
<a href='/docs/ecosystem/autostart/'>Autostart </a>
<ul>
<li><a href='/docs/ecosystem/autostart/systemd/'>systemd (Linux) </a></li>
<li><a href='/docs/ecosystem/autostart/upstart/'>Upstart (Linux) </a></li>
<li><a href='/docs/ecosystem/autostart/init.d/'>init.d (Linux) </a></li>
<li><a href='/docs/ecosystem/autostart/macos/'>macOS </a></li>
<li><a href='/docs/ecosystem/autostart/synology/'>Synology NAS </a></li>
</ul>
</li>
<li>
<a href='/docs/ecosystem/appdaemon/'>AppDaemon </a>
<ul>
<li><a href='/docs/ecosystem/appdaemon/installation/'>Installation </a></li>
<li><a href='/docs/ecosystem/appdaemon/configuration/'>Configuration </a></li>
<li><a href='/docs/ecosystem/appdaemon/example_apps/'>Example Apps </a></li>
<li><a href='/docs/ecosystem/appdaemon/running/'>Running AppDaemon </a></li>
<li><a href='/docs/ecosystem/appdaemon/reboot/'>Starting AppDaemon at Reboot </a></li>
<li><a href='/docs/ecosystem/appdaemon/operation/'>Operation </a></li>
<li><a href='/docs/ecosystem/appdaemon/windows/'>AppDaemon on Windows </a></li>
<li><a href='/docs/ecosystem/appdaemon/updating/'>Updating AppDaemon </a></li>
<li><a href='/docs/ecosystem/appdaemon/tutorial/'>AppDaemon Tutorial </a></li>
<li><a href='/docs/ecosystem/appdaemon/api/'>AppDaemon API Reference </a></li>
</ul>
</li>
<li>
<a href='/docs/ecosystem/hadashboard/'>HADashboard </a>
<ul>
<li><a href='/docs/ecosystem/hadashboard/installation/'>Installation </a></li>
<li><a href='/docs/ecosystem/hadashboard/dash_config/'>Dashboard Configuration </a></li>
<li><a href='/docs/ecosystem/hadashboard/hapush/'>HAPush </a></li>
<li><a href='/docs/ecosystem/hadashboard/reboot/'>Reboot </a></li>
<li><a href='/docs/ecosystem/hadashboard/updating/'>Updating HADashboard </a></li>
</ul>
</li>
<li>
<a href='/docs/ecosystem/notebooks/'>Notebooks </a>
<ul>
<li><a href='/docs/ecosystem/notebooks/'>Introduction </a></li>
<li><a href='/docs/ecosystem/notebooks/installation/'>Installation </a></li>
<li><a href='/docs/ecosystem/notebooks/graph/'>Graph </a></li>
<li><a href='/docs/ecosystem/notebooks/api/'>Home Assistant API </a></li>
<li><a href='/docs/ecosystem/notebooks/database/'>Databsase </a></li>
<li><a href='/docs/ecosystem/notebooks/stats/'>Statistics </a></li>
</ul>
</li>
<li>
<a href='/docs/ecosystem/ios/notifications/'>iOS </a>
<ul>
<li><a href='/docs/ecosystem/ios/notifications/basic/'>Basic notifications </a></li>
<ul>
<li><a href='/docs/ecosystem/ios/notifications/examples/'>Examples </a></li>
<li><a href='/docs/ecosystem/ios/notifications/sounds/'>Sounds </a></li>
<li><a href='/docs/ecosystem/ios/notifications/architecture/'>Architecture </a></li>
<li><a href='/docs/ecosystem/ios/notifications/privacy_security_rate_limits/'>Privacy, rate limiting and security </a></li>
</ul>
<li>Advanced notifications</li>
<ul>
<li><a href='/docs/ecosystem/ios/notifications/attachments/'>Attachments </a></li>
<li><a href='/docs/ecosystem/ios/notifications/content_extensions/'>Dynamic content </a></li>
<li><a href='/docs/ecosystem/ios/notifications/actions/'>Actionable notifications </a></li>
<li><a href='/docs/ecosystem/ios/notifications/requesting_location_updates/'>Requesting location updates </a></li>
</ul>
<li><a href='/docs/ecosystem/ios/location/'>Location Tracking </a></li>
<li><a href='/docs/ecosystem/ios/integration/'>Integration with other apps </a></li>
</ul>
</li>
</ul>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">home-assistant.io</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
</div>
</div>
</div>
</div>
</footer>
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>