Site updated at 2017-03-18 17:12:07 UTC
This commit is contained in:
parent
7573fcba68
commit
67179bf8fe
994 changed files with 1768 additions and 68252 deletions
|
@ -3,17 +3,14 @@
|
|||
<!--[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>Events - Home Assistant</title>
|
||||
<meta name="author" content="Home Assistant">
|
||||
<meta name="description" content="Describes all there is to know about events in Home Assistant.">
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="canonical" href="https://home-assistant.io/docs/configuration/events/">
|
||||
|
||||
<meta property="fb:app_id" content="338291289691179">
|
||||
<meta property="og:title" content="Events">
|
||||
<meta property="og:site_name" content="Home Assistant">
|
||||
|
@ -21,39 +18,31 @@
|
|||
<meta property="og:type" content="article">
|
||||
<meta property="og:description" content="Describes all there is to know about events in 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="Events">
|
||||
<meta name="twitter:description" content="Describes all there is to know about events in 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>
|
||||
|
@ -64,47 +53,28 @@
|
|||
</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/events.markdown'>Edit this page on GitHub</a></div>
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
<h1 class="title indent">
|
||||
Events
|
||||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
|
||||
|
||||
<p>The core of Home Assistant is the event bus. The event bus allows any component to fire or listen for events. It is the core of everything. For example, any state change will be announced on the event bus as a <code class="highlighter-rouge">state_changed</code> event containing the previous and the new state of an entity.</p>
|
||||
|
||||
<p>Home Assistant contains a few built-in events that are used to coordinate between various components.</p>
|
||||
|
||||
<h3><a class="title-link" name="event-homeassistant_start" href="#event-homeassistant_start"></a> Event <code class="highlighter-rouge">homeassistant_start</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">homeassistant_start</code> is fired when all components from the configuration have been intitialized. This is the event that will start the timer firing off <code class="highlighter-rouge">time_changed</code> events.</p>
|
||||
|
||||
<h3><a class="title-link" name="event-homeassistant_stop" href="#event-homeassistant_stop"></a> Event <code class="highlighter-rouge">homeassistant_stop</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">homeassistant_stop</code> is fired when Home Assistant is shutting down. It should be used to close any open connection or release any resources.</p>
|
||||
|
||||
<h3><a class="title-link" name="event-state_changed" href="#event-state_changed"></a> Event <code class="highlighter-rouge">state_changed</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">state_changed</code> is fired when a state changes. Both <code class="highlighter-rouge">old_state</code> and <code class="highlighter-rouge">new_state</code> are state objects. <a href="/topics/state_object/">Documentation about state objects.</a></p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -127,10 +97,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-time_changed" href="#event-time_changed"></a> Event <code class="highlighter-rouge">time_changed</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">time_changed</code> is fired every second by the timer and contains the current time.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -145,10 +113,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-service_registered" href="#event-service_registered"></a> Event <code class="highlighter-rouge">service_registered</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">service_registered</code> is fired when a new service has been registered within Home Assistant.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -167,10 +133,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-call_service" href="#event-call_service"></a> Event <code class="highlighter-rouge">call_service</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">call_service</code> is fired to call a service.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -197,10 +161,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-service_executed" href="#event-service_executed"></a> Event <code class="highlighter-rouge">service_executed</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">service_executed</code> is fired by the service handler to indicate the service is done.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -215,10 +177,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-platform_discovered" href="#event-platform_discovered"></a> Event <code class="highlighter-rouge">platform_discovered</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">platform_discovered</code> is fired when a new platform has been discovered by the discovery component.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -237,10 +197,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a class="title-link" name="event-component_loaded" href="#event-component_loaded"></a> Event <code class="highlighter-rouge">component_loaded</code></h3>
|
||||
<p>Event <code class="highlighter-rouge">component_loaded</code> is fired when a new component has been loaded and initialized.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -255,18 +213,10 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</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>
|
||||
|
@ -453,13 +403,10 @@
|
|||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
@ -469,7 +416,6 @@
|
|||
<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 />
|
||||
|
@ -481,7 +427,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
|
@ -489,4 +434,4 @@
|
|||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue