Site updated at 2017-12-25 20:35:33 UTC

This commit is contained in:
Travis CI 2017-12-25 20:35:34 +00:00
parent 92fb0dacbf
commit e06ba9f58c
29 changed files with 370 additions and 66 deletions

View file

@ -4,7 +4,7 @@
<title><![CDATA[Home Assistant]]></title> <title><![CDATA[Home Assistant]]></title>
<link href="https://home-assistant.io/atom.xml" rel="self"/> <link href="https://home-assistant.io/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Announcements | Home Assistant]]></title> <title><![CDATA[Category: Announcements | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/announcements/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/announcements/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Community | Home Assistant]]></title> <title><![CDATA[Category: Community | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Device-Tracking | Home Assistant]]></title> <title><![CDATA[Category: Device-Tracking | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title> <title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: How-To | Home Assistant]]></title> <title><![CDATA[Category: How-To | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: iBeacons | Home Assistant]]></title> <title><![CDATA[Category: iBeacons | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title> <title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title> <title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Media | Home Assistant]]></title> <title><![CDATA[Category: Media | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/media/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/media/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Merchandise | Home Assistant]]></title> <title><![CDATA[Category: Merchandise | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/merchandise/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/merchandise/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Micropython | Home Assistant]]></title> <title><![CDATA[Category: Micropython | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/micropython/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/micropython/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: MQTT | Home Assistant]]></title> <title><![CDATA[Category: MQTT | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Organisation | Home Assistant]]></title> <title><![CDATA[Category: Organisation | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title> <title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title> <title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title> <title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title> <title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Survey | Home Assistant]]></title> <title><![CDATA[Category: Survey | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Talks | Home Assistant]]></title> <title><![CDATA[Category: Talks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Technology | Home Assistant]]></title> <title><![CDATA[Category: Technology | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/technology/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/technology/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: User-Stories | Home Assistant]]></title> <title><![CDATA[Category: User-Stories | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Video | Home Assistant]]></title> <title><![CDATA[Category: Video | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Website | Home Assistant]]></title> <title><![CDATA[Category: Website | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/> <link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/> <link href="https://home-assistant.io/"/>
<updated>2017-12-24T23:30:07+00:00</updated> <updated>2017-12-25T20:27:02+00:00</updated>
<id>https://home-assistant.io/</id> <id>https://home-assistant.io/</id>
<author> <author>
<name><![CDATA[Home Assistant]]></name> <name><![CDATA[Home Assistant]]></name>

View file

@ -142,7 +142,12 @@ A great place to find popular configurations is on this <a href="https://github.
</ul> </ul>
<h3><a class="title-link" name="automation-in-python-examples" href="#automation-in-python-examples"></a> Automation in Python Examples</h3> <h3><a class="title-link" name="automation-in-python-examples" href="#automation-in-python-examples"></a> Automation in Python Examples</h3>
<ul> <ul>
<li><a href="/cookbook/python_component_simple_alarm/">Flash lights when intruder detected</a></li> <li>
<p><a href="/cookbook/python_component_automation/">Automation in Code</a></p>
</li>
<li>
<p><a href="/cookbook/python_component_simple_alarm/">Flash lights when intruder detected</a></p>
</li>
</ul> </ul>
<h3><a class="title-link" name="custom-python-component-examples" href="#custom-python-component-examples"></a> Custom Python Component Examples</h3> <h3><a class="title-link" name="custom-python-component-examples" href="#custom-python-component-examples"></a> Custom Python Component Examples</h3>
<ul> <ul>

View file

@ -0,0 +1,292 @@
<!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>Automation in Code - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="A sample to do automations in Python Code.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/cookbook/python_component_automation/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation in Code">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/cookbook/python_component_automation/">
<meta property="og:type" content="article">
<meta property="og:description" content="A sample to do automations in Python Code.">
<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="Automation in Code">
<meta name="twitter:description" content="A sample to do automations in Python Code.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
<link href="/stylesheets/screen.css" media="screen, projection, print" 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 class='site-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>
<li><a href='#' class='show-search'><i class="icon-search"></i></a></li>
</ul>
</nav>
<div class='search-container' style='display: none'>
<div class='search'>
<i class="icon-search"></i>
<input id='search' placeholder='Search the docs…'>
<a href='#' class='close'><i class="icon-remove-sign"></i></a>
</div>
</div>
</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">
<header>
<h1 class="title indent">
Automation in Code
</h1>
</header>
<hr class="divider">
<p>Example component to target an <code class="highlighter-rouge">entity_id</code> to:</p>
<ul>
<li>turn it on at 7AM in the morning</li>
<li>turn it on if anyone comes home and it is off</li>
<li>turn it off if all lights are turned off</li>
<li>turn it off if all people leave the house</li>
<li>offer a service to turn it on for 10 seconds</li>
</ul>
<p>To set it up, add the following lines to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">example</span><span class="pi">:</span>
<span class="s">target</span><span class="pi">:</span> <span class="s">TARGET_ENTITY</span>
</code></pre>
</div>
<p>Configuration variables:</p>
<ul>
<li><strong>target</strong> (<em>Required</em>): TARGET_ENTITY should be one of your devices that can be turned on and off, e.g., a light or a switch. Example value could be light.Ceiling or switch.AC (if you have these devices with those names).</li>
</ul>
<p>Create the file <code class="highlighter-rouge">&lt;config dir&gt;/custom_components/example.py</code> and copy paste the content below:</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="s">"""
Example of a custom component.
"""</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">from</span> <span class="nn">homeassistant.const</span> <span class="kn">import</span> <span class="n">STATE_HOME</span><span class="p">,</span> <span class="n">STATE_NOT_HOME</span><span class="p">,</span> <span class="n">STATE_ON</span><span class="p">,</span> <span class="n">STATE_OFF</span>
<span class="kn">from</span> <span class="nn">homeassistant.helpers</span> <span class="kn">import</span> <span class="n">validate_config</span>
<span class="kn">from</span> <span class="nn">homeassistant.helpers.event_decorators</span> <span class="kn">import</span> \
<span class="n">track_state_change</span><span class="p">,</span> <span class="n">track_time_change</span>
<span class="kn">from</span> <span class="nn">homeassistant.helpers.service</span> <span class="kn">import</span> <span class="n">service</span>
<span class="kn">import</span> <span class="nn">homeassistant.components</span> <span class="kn">as</span> <span class="nn">core</span>
<span class="kn">from</span> <span class="nn">homeassistant.components</span> <span class="kn">import</span> <span class="n">device_tracker</span>
<span class="kn">from</span> <span class="nn">homeassistant.components</span> <span class="kn">import</span> <span class="n">light</span>
<span class="c"># The domain of your component. Should be equal to the name of your component.</span>
<span class="n">DOMAIN</span> <span class="o">=</span> <span class="s">"example"</span>
<span class="c"># List of component names (string) your component depends upon.</span>
<span class="c"># We depend on group because group will be loaded after all the components that</span>
<span class="c"># initialize devices have been setup.</span>
<span class="n">DEPENDENCIES</span> <span class="o">=</span> <span class="p">[</span><span class="s">'group'</span><span class="p">,</span> <span class="s">'device_tracker'</span><span class="p">,</span> <span class="s">'light'</span><span class="p">]</span>
<span class="c"># Configuration key for the entity id we are targeting.</span>
<span class="n">CONF_TARGET</span> <span class="o">=</span> <span class="s">'target'</span>
<span class="c"># Variable for storing configuration parameters.</span>
<span class="n">TARGET_ID</span> <span class="o">=</span> <span class="bp">None</span>
<span class="c"># Name of the service that we expose.</span>
<span class="n">SERVICE_FLASH</span> <span class="o">=</span> <span class="s">'flash'</span>
<span class="c"># Shortcut for the logger</span>
<span class="n">_LOGGER</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">setup</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">config</span><span class="p">):</span>
<span class="s">"""Setup example component."""</span>
<span class="k">global</span> <span class="n">TARGET_ID</span>
<span class="c"># Validate that all required config options are given.</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">validate_config</span><span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="p">{</span><span class="n">DOMAIN</span><span class="p">:</span> <span class="p">[</span><span class="n">CONF_TARGET</span><span class="p">]},</span> <span class="n">_LOGGER</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">False</span>
<span class="n">TARGET_ID</span> <span class="o">=</span> <span class="n">config</span><span class="p">[</span><span class="n">DOMAIN</span><span class="p">][</span><span class="n">CONF_TARGET</span><span class="p">]</span>
<span class="c"># Validate that the target entity id exists.</span>
<span class="k">if</span> <span class="n">hass</span><span class="o">.</span><span class="n">states</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">TARGET_ID</span><span class="p">)</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
<span class="n">_LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s">"Target entity id </span><span class="si">%</span><span class="s">s does not exist"</span><span class="p">,</span>
<span class="n">TARGET_ID</span><span class="p">)</span>
<span class="c"># Tell the bootstrapper that we failed to initialize and clear the</span>
<span class="c"># stored target id so our functions don't run.</span>
<span class="n">TARGET_ID</span> <span class="o">=</span> <span class="bp">None</span>
<span class="k">return</span> <span class="bp">False</span>
<span class="c"># Tell the bootstrapper that we initialized successfully.</span>
<span class="k">return</span> <span class="bp">True</span>
<span class="nd">@track_state_change</span><span class="p">(</span><span class="n">device_tracker</span><span class="o">.</span><span class="n">ENTITY_ID_ALL_DEVICES</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">track_devices</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">entity_id</span><span class="p">,</span> <span class="n">old_state</span><span class="p">,</span> <span class="n">new_state</span><span class="p">):</span>
<span class="s">"""Called when the group.all devices change state."""</span>
<span class="c"># If the target id is not set, return</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">TARGET_ID</span><span class="p">:</span>
<span class="k">return</span>
<span class="c"># If anyone comes home and the entity is not on, turn it on.</span>
<span class="k">if</span> <span class="n">new_state</span><span class="o">.</span><span class="n">state</span> <span class="o">==</span> <span class="n">STATE_HOME</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">core</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">):</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="c"># If all people leave the house and the entity is on, turn it off.</span>
<span class="k">elif</span> <span class="n">new_state</span><span class="o">.</span><span class="n">state</span> <span class="o">==</span> <span class="n">STATE_NOT_HOME</span> <span class="ow">and</span> <span class="n">core</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">):</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_off</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="nd">@track_time_change</span><span class="p">(</span><span class="n">hour</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">minute</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">second</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">wake_up</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">now</span><span class="p">):</span>
<span class="s">"""Turn light on in the morning.
Turn the light on at 7 AM if there are people home and it is not already
on.
"""</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">TARGET_ID</span><span class="p">:</span>
<span class="k">return</span>
<span class="k">if</span> <span class="n">device_tracker</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">core</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">):</span>
<span class="n">_LOGGER</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">'People home at 7AM, turning it on'</span><span class="p">)</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="nd">@track_state_change</span><span class="p">(</span><span class="n">light</span><span class="o">.</span><span class="n">ENTITY_ID_ALL_LIGHTS</span><span class="p">,</span> <span class="n">STATE_ON</span><span class="p">,</span> <span class="n">STATE_OFF</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">all_lights_off</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">entity_id</span><span class="p">,</span> <span class="n">old_state</span><span class="p">,</span> <span class="n">new_state</span><span class="p">):</span>
<span class="s">"""If all lights turn off, turn off."""</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">TARGET_ID</span><span class="p">:</span>
<span class="k">return</span>
<span class="k">if</span> <span class="n">core</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">):</span>
<span class="n">_LOGGER</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">'All lights have been turned off, turning it off'</span><span class="p">)</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_off</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="nd">@service</span><span class="p">(</span><span class="n">DOMAIN</span><span class="p">,</span> <span class="n">SERVICE_FLASH</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">flash_service</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">call</span><span class="p">):</span>
<span class="s">"""Service that will toggle the target.
Set the light to off for 10 seconds if on and vice versa.
"""</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">TARGET_ID</span><span class="p">:</span>
<span class="k">return</span>
<span class="k">if</span> <span class="n">core</span><span class="o">.</span><span class="n">is_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">):</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_off</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_on</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="n">core</span><span class="o">.</span><span class="n">turn_off</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">TARGET_ID</span><span class="p">)</span>
</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='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_cookbook/python_component_automation.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<a href='/cookbook'>Back to the cookbook</a>
</div>
<div class='section'>
<h1 class="title delta">Automation in Python Examples</h1>
<ul class='divided'>
<li>
Automation in Code
</li>
<li>
<a href='/cookbook/python_component_simple_alarm/'>Flash lights when intruder detected</a>
</li>
</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> (no support!).<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>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
docsearch({
apiKey: 'ae96d94b201c5444c8a443093edf3efb',
indexName: 'home-assistant',
inputSelector: '#search',
debug: false // Set debug to true if you want to inspect the dropdown
});
document.querySelector('.search .close').addEventListener('click', function(ev) {
ev.preventDefault();
document.querySelector('.search-container').style.display = 'none';
});
document.querySelector('.show-search').addEventListener('click', function(ev) {
ev.preventDefault();
document.querySelector('.search-container').style.display = 'block';
document.getElementById('toggle').checked = false;
document.querySelector('.search-container input').focus();
});
</script>
</body>
</html>

View file

@ -193,6 +193,9 @@
<div class='section'> <div class='section'>
<h1 class="title delta">Automation in Python Examples</h1> <h1 class="title delta">Automation in Python Examples</h1>
<ul class='divided'> <ul class='divided'>
<li>
<a href='/cookbook/python_component_automation/'>Automation in Code</a>
</li>
<li> <li>
Flash lights when intruder detected Flash lights when intruder detected
</li> </li>

View file

@ -102,7 +102,7 @@ Diagram showing interaction between components and the Home Assistant core
Turn on the lights Turn on the lights
</code></pre> </code></pre>
</div> </div>
<p>Look <a href="https://github.com/home-assistant/home-assistant/blob/master/config/custom_components/example.py">here</a> for a comprehensive example of a home automation component.</p> <p>Look <a href="/python_component_automation/">here</a> for a comprehensive example of a home automation component.</p>
<h3><a class="title-link" name="the-full-picture" href="#the-full-picture"></a> The full picture</h3> <h3><a class="title-link" name="the-full-picture" href="#the-full-picture"></a> The full picture</h3>
<p>When we put all the different pieces of Home Assistant together, its a close match for the initial home automation overview sketch. The smart home AI has not been implemented yet, so its not included in this picture.</p> <p>When we put all the different pieces of Home Assistant together, its a close match for the initial home automation overview sketch. The smart home AI has not been implemented yet, so its not included in this picture.</p>
<p class="img"> <p class="img">

View file

@ -3826,7 +3826,7 @@
</url> </url>
<url> <url>
<loc>https://home-assistant.io/components/switch.hook/</loc> <loc>https://home-assistant.io/components/switch.hook/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/cookbook/automation_for_rainy_days/</loc> <loc>https://home-assistant.io/cookbook/automation_for_rainy_days/</loc>
@ -3873,6 +3873,10 @@
<lastmod>2016-02-13T06:51:00+00:00</lastmod> <lastmod>2016-02-13T06:51:00+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/cookbook/python_component_automation/</loc>
<lastmod>2016-02-14T08:40:00+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/cookbook/python_component_simple_alarm/</loc> <loc>https://home-assistant.io/cookbook/python_component_simple_alarm/</loc>
<lastmod>2016-02-14T08:40:00+00:00</lastmod> <lastmod>2016-02-14T08:40:00+00:00</lastmod>
</url> </url>
@ -4502,99 +4506,99 @@
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/autostart/init.d/</loc> <loc>https://home-assistant.io/docs/autostart/init.d/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/api/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/api/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/configuration/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/configuration/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/installation/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/installation/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/operation/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/operation/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/reboot/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/reboot/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/running/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/running/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/updating/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/updating/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/appdaemon/windows/</loc> <loc>https://home-assistant.io/docs/ecosystem/appdaemon/windows/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/certificates/</loc> <loc>https://home-assistant.io/docs/ecosystem/certificates/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/hadashboard/</loc> <loc>https://home-assistant.io/docs/ecosystem/hadashboard/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/hass-configurator/</loc> <loc>https://home-assistant.io/docs/ecosystem/hass-configurator/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/ios/</loc> <loc>https://home-assistant.io/docs/ecosystem/ios/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/nginx/</loc> <loc>https://home-assistant.io/docs/ecosystem/nginx/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/notebooks/</loc> <loc>https://home-assistant.io/docs/ecosystem/notebooks/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/scenegen/</loc> <loc>https://home-assistant.io/docs/ecosystem/scenegen/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/ecosystem/synology/</loc> <loc>https://home-assistant.io/docs/ecosystem/synology/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/tools/</loc> <loc>https://home-assistant.io/docs/tools/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/tools/dev-tools/</loc> <loc>https://home-assistant.io/docs/tools/dev-tools/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/tools/hass/</loc> <loc>https://home-assistant.io/docs/tools/hass/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/docs/tools/scripts/</loc> <loc>https://home-assistant.io/docs/tools/scripts/</loc>
<lastmod>2017-12-24T23:30:07+00:00</lastmod> <lastmod>2017-12-25T20:27:02+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/faq/after-upgrading/</loc> <loc>https://home-assistant.io/faq/after-upgrading/</loc>
@ -5726,62 +5730,62 @@
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/frontend.html</loc> <loc>https://home-assistant.io/demo/frontend.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/index.html</loc> <loc>https://home-assistant.io/demo/index.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-event.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-dev-event.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-info.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-dev-info.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-service.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-dev-service.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-state.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-dev-state.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-template.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-dev-template.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-history.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-history.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-iframe.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-iframe.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-logbook.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-logbook.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/demo/panels/ha-panel-map.html</loc> <loc>https://home-assistant.io/demo/panels/ha-panel-map.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/googlef4f3693c209fe788.html</loc> <loc>https://home-assistant.io/googlef4f3693c209fe788.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html</loc> <loc>https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html</loc> <loc>https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
<url> <url>
<loc>https://home-assistant.io/static/mdi-demo.html</loc> <loc>https://home-assistant.io/static/mdi-demo.html</loc>
<lastmod>2017-12-24T23:29:21+00:00</lastmod> <lastmod>2017-12-25T20:26:24+00:00</lastmod>
</url> </url>
</urlset> </urlset>